7heo.tk 7heo.tk - 4 months ago 23
PHP Question

How to open a remote resource with fsockopen and allow_url_fopen disabled, no socket (extension) support, and no cURL support?

How to open a remote resource with

fsockopen
and
allow_url_fopen
disabled, no socket (extension) support, and no cURL support?

Is there any other alternative?

Answer

There seems to be no way to open a remote resource via HTTP with the following conditions:

  • fsockopen disabled
  • allow_url_fopen disabled
  • no support for the socket extension
  • no support for the cURL extension

The solution is either to provide the files via other means (FTP (via PHP or manually), etc) or to require the server administrator to relax the security (for example to remove fsockopen from the disabled functions list.

Comments