test melih
 melih
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • d3von Friend
    #171054

    I want to implement this php code but it doesn’t work:

    [PHP] <?php

    // Konfiguration

    $m_lt_check = “0”; # Erzeugt beim Wert 1 eine Testausgabe

    $m_lt_res_pre = “<p>”; # HTML-Code vor der Ausgabe
    $m_lt_res_suf = “</p>”; # HTML-Code nach der Ausgabe
    $m_lt_res_sep = “<br />”; # HTML-Code zwichen den Links, falls mehr als ein Link gebucht wurde

    $m_lt_res_charset = “UTF-8”; # Zeichensatz

    // !!! Folgender Code sollte nicht geändert werden !!!

    $m_lt_url=’http://serv2.buywords.de/mod/linktrade/res.html?v=2&account_id=888&domain=’.$_SERVER[‘HTTP_HOST’].’&url=’.urlencode($_SERVER[‘REQUEST_URI’]).’&qs=’.urlencode($_SERVER[‘QUERY_STRING’]).’&ip=’.$_SERVER[‘REMOTE_ADDR’].’&charset=’.urlencode($m_lt_res_charset).’&res_check=’.$m_lt_check.’&res_pre=’.urlencode($m_lt_res_pre).’&res_suf=’.urlencode($m_lt_res_suf).’&res_sep=’.urlencode($m_lt_res_sep); $m_lt_res=”;

    if(function_exists(‘curl_init’)) {

    $m_lt_handle=curl_init();

    curl_setopt($m_lt_handle,CURLOPT_URL,$m_lt_url);
    curl_setopt($m_lt_handle,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($m_lt_handle,CURLOPT_TIMEOUT,3);
    curl_setopt($m_lt_handle,CURLOPT_CONNECTTIMEOUT,3);

    $m_lt_res=curl_exec($m_lt_handle); curl_close($m_lt_handle);

    }
    elseif(@ini_get(‘allow_url_fopen’)) {

    $m_lt_res=@file_get_contents($m_lt_url);

    }

    if(strpos($m_lt_res,'<m_lt_code>’)) {

    echo trim(str_replace(‘<m_lt_code>’,”,$m_lt_res));

    }

    //

    ?>[/PHP]

    I tried to use a empty module ( The code doesn’t work correctly) and other extensions like “Flexi Custom Code” but there i get this error:

    [PHP]
    Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/web613/html/:/var/www/web613/phptmp/:/var/www/web613/files/:/var/www/web613/atd/:/usr/share/php/) in /var/www/web613/html/stage1/modules/mod_flexi_customcode/helper.php on line 19

    Warning: fopen() [function.fopen]: Filename cannot be empty in /var/www/web613/html/stage1/modules/mod_flexi_customcode/helper.php on line 20

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/web613/html/stage1/modules/mod_flexi_customcode/helper.php on line 21

    Warning: fclose(): supplied argument is not a valid stream resource in /var/www/web613/html/stage1/modules/mod_flexi_customcode/helper.php on line 22

    Warning: include_once() [function.include-once]: Filename cannot be empty in /var/www/web613/html/stage1/modules/mod_flexi_customcode/helper.php on line 23

    Warning: include_once() [function.include]: Failed opening ” for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/web613/html/stage1/modules/mod_flexi_customcode/helper.php on line 23[/PHP]

    Now i try to use “Blank Module” but the module is empty. There is a plugin for this but only for joomla 1.5 🙁 -> http://www.buywords.de/plugin-download.html?res=jo_15

    Website: http://www.dailymusicpromo.com

    Has anyone an idea?

    Blaine Friend
    #426826

    Hi!
    You have created a custom HTML module and it does not work?
    Thanks!

    jooservices Friend
    #426843

    Hi
    #1 As your above error code message:

    Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/web613/html/:/var/www/web613/phptmp/:/var/www/web613/files/:/var/www/web613/atd/:/usr/share/php/) in /var/www/web613/html/stage1/modules/mod_flexi_customcode/helper.php on line 19

    Because your server using open_basedir .This one limited your php code not allow to read outside dir.
    Please contact your hosting provider to fix this bug.

    #2 Would you mind let’s me know what are you doing with this module , so i can help you in code

    #3 I see this’s not JA issues. 🙂

    Finally please
    – Send me your pack of the module you want to use / code it. So i can help you .
    – Work with your HP to fix open_basedir issue.

    Thank you,
    Viet Vu

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 3 voices, and was last updated by  jooservices 13 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum