PHP file_get_contents timeout when loading facebook / google
Hi Threre,
My PHP can't use file_get_contents for some website (facebook/google,...) It can load data from other sites, but not this 2.
I google around and do all recommened method
- allow_url_fopen
- turn off firewall
But still not load these pages
Example Result
Have anyone have familar error? Any suggestion? Thanks
Warning: file_get_contents(https://www.facebook.com/): failed to open stream: Connection timed out in /home/xxxxx/public_html/xxxxx/file.php on line 5Have anyone have familar error? Any suggestion? Thanks
-
Any suggestion please. It worked at first but a few days ago it not work anymore, I not change anything in cPanel. Also try rebuild PHP & Apache still not work [COLOR="silver">- - - Updated - - - I wondering that just google and facebook are blocked from file_get_contents but all other site working fine. There is where that I should look into? that can block this kind of certain url. Thanks 0 -
Hello :) I believe it violates Facebook's terms of service, so it's possible that connection is blocked by Facebook. The following third-party URL may help: [url=http://stackoverflow.com/questions/6724467/why-doesnt-file-get-contents-work]php - Why doesn't file_get_contents work? - Stack Overflow Thank you. 0 -
I think what cause the problem is IPv4, IPv6 stuff. I can't use wget for some domain that have IPV6 either (facebook, google) 0 -
I don't believe this issue is related to any settings or configurations associated with cPanel/WHM. However, feel free to open a support ticket using the link in my signature if you want us to verify that for you. You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
5 comments