I am trying to simply use file_get_contents()
to get content of http://www.google.com/search?hl=en&tbm=nws&authuser=0&q=Pakistan
with same code on 2 different servers. One is getting every thing file while other is getting 403 error. I am unable to know what exactly the reason is. I used phpinfo() on both servers.
One difference I observe is that one use apache2 while other use some other HTTP server named LiteSpeed V6.6
. But i don't know how if it affect this file_get_contents()
method. For more detail you can see their phpinfo() page link below.
Where file_get_contents getting
403 the phpinfo is; http://zavahost.com/newsreader/phpinfo.php
while where it is working file , here is the phpinfo: http://162.243.5.14/info.php
I will be thankful if someone can tell that what is effecting file_get_contents()? Please let me know if any idea?