Helpful Information
 
 
Category: DNS
DNS and PHP fopen function dead on me

I just got a dedicated server and these php scripts are dead on me when I pull from a .co.uk domain ... .com .net etc etc are fine

Ive changed my resolv.conf ips but still dead , if I do an ip lookup on the domains im pulling thats fine it pulls the ip , just the scripts dont pull...

or maybe someone could suggest a rewrite of this script in order to work. Is there another way to do the same thing without the fopen function?

<?php
$URL = "http://www.blackstar.co.uk/circle/charts/dvd";
$GrabStart = "See also";
$GrabEnd = "width=379";
$OpenFile = fopen("$URL", "r");
$RetrieveFile = fread($OpenFile, 100000); $GrabData = eregi("$GrabStart(.*)$GrabEnd", $RetrieveFile, $DataPrint);
$DataPrint[1] = str_replace("/img", "http://www.blackstar.co.uk/img", $DataPrint[1]);
$DataPrint[1] = str_replace("", "", $DataPrint[1]);
$DataPrint[1] = str_replace("/circle/promotion", "http://www.blackstar.co.uk/circle/promotion", $DataPrint[1]);
$DataPrint[1] = str_replace("/bsimg/explore", "http://www.blackstar.co.uk/bsimg/explore", $DataPrint[1]);
echo $DataPrint[1];
?>

itīs probably the missing trailing slash.

$URL = "http://www.blackstar.co.uk/circle/charts/dvd/";

no, I had tried that ..

Ive given the script to numerous friends who use it just fine without any problems...

Had the same scripts running fine on my other server... its just since I got this new server and there just dead.

Ive put this into my resolv.conf file

search ns1.kbhosting.com
nameserver 127.0.0.1.
nameserver 64.246.11.39
nameserver 64.246.10.238

those being my box name and ips , im running my own nameservers... does that seem correct to you...

Or can I just drop anyones nameservrs in there?

Ive just removed ...

nameserver 127.0.0.1.

as it failed doing nslookup www.mydomain.co.uk

so I now have

search ns1.kbhosting.com
nameserver 64.246.11.39
nameserver 64.246.10.238

(script still dont work though)

>> script still dont work though

Script don't work just ask this in PHP forum. What makes you think that it's a DNS issue in the first place?

ns1.kbhosting.com was able to lookup www.blackstar.co.uk, that's all have to do with DNS.

BTW, you should change your MX from mail.kbhosting.com to ns1.kbhosting.com. Currently your MX is 40% unreliable because of wrong MX and broken reverse DNS on ev1.net. Still, that have nothing to do with resolving www.blackstar.co.uk to IP.

After /etc/resolv.conv is fixed and ping start working from command line, you still need to restart apache or restart computer

Why dig up a 6 and a half year old thread?

Why dig up a 6 and a half year old thread?

I got similar problem and this thread was first on google but there was no solution. So, I have contributed to something that was not resolved in last 6 years.










privacy (GDPR)