We have had exactly the same script on our site for years and it has worked without a hitch. What it does is pull the bestseller charts from a DVD store we are an affiliate of.
However, now it has stopped working all of a sudden:
http://www.ukhotmovies.com/charts/sendit.php
I have tried it on another webhost and it doesn't work there either, although the error message is completely different:
http://www.i-matchbooks.com/guest/sendit.php
Has something gone wrong on our host's end or has the site we pull the data from done something that we can ask them to change?
I would appreciate any help anybody could offer...
The script is here in case it helps:
PHP Code:
<?php
$Code = "/scp/id/ukhot"; //change your ID code here
$GrabURL = "http://www.sendit.com/circle/charts/dvd";
$GrabStart = "<a
href=\"http://www.sendit.com/circle/charts/preorder\">Pre-Orders</a>";
$GrabEnd = "footer_2004";
$RetrieveFile = file_get_contents($GrabURL);
$GrabData = eregi("$GrabStart(.*)$GrabEnd", $RetrieveFile, $DataPrint);
$DataPrint[1] = str_replace("<h1 class=\"print_head\"> ", "
<h1 class=\"print_head\"> ", $DataPrint[1]);
$DataPrint[1] = str_replace("h1", "h5", $DataPrint[1]);
$DataPrint[1] = str_replace("height: 70px;\">
", "height: 70px;\">", $DataPrint[1]);
$DataPrint[1] = str_replace("float: left; margin-top: 10px", "float: left; margin-top: 0px", $DataPrint[1]);
$DataPrint[1] = str_replace("Sendit's", "UKHotMovies.com", $DataPrint[1]);
$DataPrint[1] = str_replace("#c00;", "#1D418B", $DataPrint[1]);
$DataPrint[1] = str_replace("font-size: 14px", "font-size: 12px", $DataPrint[1]);
$DataPrint[1] = str_replace(" <a", " <a title=\"One of this week's bestselling DVDs at UKHotMovies.com. Click here to find out more about it at our partner store\"", $DataPrint[1]);
$DataPrint[1] = str_replace("[/b]</div>
", "[/b]</div>
", $DataPrint[1]);
$DataPrint[1] = str_replace("/img", "http://www.sendit.com/img", $DataPrint[1]);
$DataPrint[1] = str_replace("/video/item", "http://www.sendit.com$Code/video/item", $DataPrint[1]);
$DataPrint[1] = str_replace(" SAVE", "
Save", $DataPrint[1]);
$DataPrint[1] = str_replace("font-weight: 600;", "", $DataPrint[1]);
$DataPrint[1] = str_replace("/circle/charts/video", "http://www.sendit.com$Code/circle/charts/video", $DataPrint[1]);
$DataPrint[1] = str_replace("/circle/charts/preorder", "http://www.sendit.com$Code/circle/charts/preorder", $DataPrint[1]);
$DataPrint[1] = str_replace("/bsimg/explore", "http://www.sendit.com/bsimg/explore", $DataPrint[1]);
$DataPrint[1] = str_replace("/new_img/misc/trans.gif", "http://www.sendit.com/new_img/misc/trans.gif", $DataPrint[1]);
echo $DataPrint[1];
include("footer.html");
?>