This is an off topic not related to Java.
Problem:
If you are running DPI 1.x from the following website www.image-host-script.com and suddently started getting the following error, here is the root cause and how you can resolve it.
Warning: file_get_contents(http://www.image-host-script.com/downloads/se_bots_ips.txt.gz) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /home/public_html/myImagehost/includes/dpi_sebots.php on line 79
Root Cause:
This image host script is a bad code, it tries to reach out back to it’s server http://www.image-host-script.com to read the list of ip addresses for the search engines so that it can update your local file. The concept of updating the ip address itself to remain is not bad, but what’s bad is the code does not handle exceptions very well. So if that website is down, your image hosting installation is down, thus creating external dependency and single point of failure.
Solution:
Here is the easiest way to resolve it.
1. Find the file includes/dpi_sebots.php
2. Look for function update_search_engine_ip_list()
3. Comment out the inside code.
Before:
function update_search_engine_ip_list() {
$time = @filemtime("./data/LID_UPDATE");
if($time == 0 or $time === FALSE or ($time > 0 && $time < time() - (3600*24)) ) {
$data = dpi_pg_fetch(SEO_IPS_);
if($data === FALSE) return false;
$f = fopen("./data/LID_UPDATE","w");
fwrite($f, $data);
fclose($f);
}
}
After:
[function update_search_engine_ip_list() {
/*
$time = @filemtime("./data/LID_UPDATE");
if($time == 0 or $time === FALSE or ($time > 0 && $time < time() - (3600*24)) ) {
$data = dpi_pg_fetch(SEO_IPS_);
if($data === FALSE) return false;
$f = fopen("./data/LID_UPDATE","w");
fwrite($f, $data);
fclose($f);
}
*/
}
This should solve your problem.
Originally posted 2012-04-24 20:42:09.