i use a web hosting web site which has currently blocked all outgoing traffic at port 80, so neither does fopen work nor does curl but wordpress is able to update it self…
hows that possible ????
i need to fetch a file from the internet as well can it be possible that i replicate the function used by wordpress and fetch the files using php..
plz help..
I’ve looked at the WordPress update code and traced it through to the WP_Http class (file source) where the actual file-download occurs. This class will use one of many built-in methods for fetching files if the preferred functions aren’t available:
One scenario is that your host isn’t actually blocking traffic on port 80, but rather making file downloading difficult by not including the cURL extension and setting
allow_url_fopento false to prevent common code-injection vulnerabilities. In this case it is possible that WordPress is succeeding by making use of one of the other methods for retrieving data. Your options for downloading files via your PHP scripts in this scenario are (in order of preference):fopenor cURL.wp-includes/class-http.phpand make use of it in your scripts to get around these limitations.An alternate scenario is that your host is blocking traffic on port 80, but has white-listed wordpress.org to allow WordPress to update itself. In this case you are out of luck unless you can configure some sort of proxy solution on another port.