I have built a script to allow our Affiliates to grab content from our own site without the need for updating. This runs fine when I test locally, but trying it on 2 seperate remote servers the script just hangs. (Our site is not local, PHP is enabled on both remotes, folder permissions set to 757)
Example remote:
http://www.dvd-player-review.co.uk/bennetts/bennetts.php
The code is copied below any suggestions would be gratefully received:
$Code = "1024"; //- ADD YOUR AFFILIATE ID HERE
//$Cat = $_GET['cat'];//Not in use yet
echo "<table>";
$URL = "http://bennettsonline.co.uk/cgi-bin/bennetts.filereader?+EN/catalogs/2160";
$GrabStart = "<!-- ut 10 -->";
$GrabEnd = "<!-- end UT10 -->";
$OpenFile = fopen("$URL", "r");
$RetrieveFile = fread($OpenFile, 100000); $GrabData = eregi("$GrabStart(.*)$GrabEnd", $RetrieveFile, $DataPrint);
$DataPrint[1] = str_replace("http://bennettsonline.co.uk/cgi-bin/bennetts.filereader?+EN/products", "http://www.e-inbusiness-affiliate.com/u/bennet12/t.asp?id=$Code&p=cgi-bin/bennetts.storefront/EN/product", $DataPrint[1]);
$DataPrint[1] = str_replace("add_button.gif", "spacer.gif", $DataPrint[1]);
$DataPrint[1] = str_replace("/isroot", "http://bennettsonline.co.uk/isroot", $DataPrint[1]);
$DataPrint[1] = str_replace("http://bennettsonline.co.uk/cgi-bin/bennetts.storefront//Offer/AddProduct/", "#", $DataPrint[1]);
$DataPrint[1] = str_replace("Buy this product", "", $DataPrint[1]);
$DataPrint[1] = str_replace("checkbox", "hidden", $DataPrint[1]);
$DataPrint[1] = str_replace("<div align=\"left\"><a href=", "<class=", $DataPrint[1]);
echo $DataPrint[1];
echo "</table><br><br>";
?>
Regards
Sean
Bennetts Electrical