X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   External Data (https://forum.x-cart.com/showthread.php?t=39238)

Knickershack 04-21-2008 08:10 AM

External Data
 
Hi All

Im trying to use the following snippet of php to display text ads from an external site, theres no errors but the advert isnt displayed, can anyone advise please?


Code:

{php}
$old = @ini_set('default_socket_timeout', 3); @set_time_limit(3);
$DN =""; if(isset($_SERVER['SERVER_NAME'])){$DN = $_SERVER['SERVER_NAME'];}
$CIP =""; if(isset($_SERVER['REMOTE_ADDR'])){$CIP = $_SERVER['REMOTE_ADDR'];}
$PU = ""; $PU = $_SERVER['PHP_SELF']; $S="?";foreach($_GET as $var => $val){$PU .= $S.$var."=".$val; $S="~";}
$FP = @fopen("http://TESTINGADVERTSERVER.COM", "r");
$PG ="";while ($TX = @fread($FP, 100)) {$PG .= $TX;}
@ini_set('default_socket_timeout', $old);
echo("$PG");
{/php}



Thank you

balinor 04-21-2008 10:08 AM

Re: External Data
 
Try this:

http://forum.x-cart.com/showthread.php?t=31610

Knickershack 04-21-2008 10:38 AM

Re: External Data
 
Thanks Balinor.

Didnt work i just get an error ..:(

Warning: Smarty error: file:http://www.xxxxxxxxx.co.uk/test.php is not readable in /home/xxxx/public_html/Smarty-2.6.12/Smarty.class.php on line 1095

If i call the script ...xxxxx.co.uk/test.php it works fine but soon as i call it from tpl it doesnt :-(


All times are GMT -8. The time now is 05:34 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.