I use the PHP function file_get_contents as a proxy to fetch websites on two different web hosts.
It works for all websites except Wikipedia.
It gives me this output every time:
WIKIMEDIA FOUNDATION
Error
Our servers are currently experiencing a technical problem. This is probably temporary and
should be fixed soon. Please try again in a few minutes.
Anyone know what the problem is?
You’re probably not passing the correct User-Agent. See here.
You should pass a context to
file_get_contents:file_get_contents– Manualstream_context_create– Manual