fsockopen
Socket transport “ssl” in PHP not enabled
I was having problem in Windows 7 with PHP 5.4.0 in command line, using Xampp 1.8.1 server. This is what i did: Rename php.ini-production to php.ini (in C:\xampp\php\ folder) Edit php.ini and uncomment extension_dir=ext. Also uncomment extension=php_openssl.dll. After that it worked fine.
How to check if a file exists from a url
You don’t need CURL for that… Too much overhead for just wanting to check if a file exists or not… Use PHP’s get_header. $headers=get_headers($url); Then check if $result[0] contains 200 OK (which means the file is there) A function to check if a URL works could be this: function UR_exists($url){ $headers=get_headers($url); return stripos($headers[0],”200 OK”)?true:false; } … Read more
php_network_getaddresses: getaddrinfo failed: Name or service not known
You cannot open a connection directly to a path on a remote host using fsockopen. The url www.mydomain.net/1/file.php contains a path, when the only valid value for that first parameter is the host, www.mydomain.net. If you are trying to access a remote URL, then file_get_contents() is your best bet. You can provide a full URL … Read more