php - file_get_contents not working on different servers -


i trying use file_get_contents() content of http://www.google.com/search?hl=en&tbm=nws&authuser=0&q=pakistan same code on 2 different servers. 1 getting every thing file while other getting 403 error. unable know reason is. used phpinfo() on both servers.

one difference observe 1 use apache2 while other use other http server named litespeed v6.6. don't know how if affect file_get_contents() method. more detail can see phpinfo() page link below. file_get_contents getting 403 phpinfo is; http://zavahost.com/newsreader/phpinfo.php

while working file , here phpinfo: http://162.243.5.14/info.php

i thankful if can tell effecting file_get_contents()? please let me know if idea?

403 unauthorized error. means lack sufficient permission connect content @ server. i'm not sure if due inability fetch data hosting provider, denied based on header information remote server has flagged unauthorized.

try using answer on post: php curl: how can emulate request web browser? curl same data server getting 403


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -