Has anyone had experienced VERY slow execution time when using file() and fopen(). I have tried using these two functions to get a remote URL, but have experienced up to 15 second execution time.
(When I use a browser to get the URL, it takes less than a second, so I'm sure it's not a delay with the remote server)
Here is my code:
$ip = getenv ("REMOTE_ADDR");
$fd = fopen
("http://us01.xmlsearch.findwhat.com/bin/findwhat.dll?getresults&mt=pets&dc=20&base=20&aff_id=xxxxx&ip_addr=$ip&fl=1", "r");
while (!feof ($fd))
{
$buffer = fgets($fd, 4096);
$getfile[] = $buffer;
}
fclose ($fd);
Thanks in advance for your help.