How do i check if php server allows external curl connections How do i check if php server allows external curl connections curl curl

How do i check if php server allows external curl connections


Create a file like this:

<?php phpinfo();?>

or

<?phpecho "<pre>";var_dump(curl_version());?>

That will tell you instantly.

Also, most free hosts do not offer Curl by default, due to abuse by spammers.


You'll definitely need to buy an account before testing the server's capacities.

But some hosts allow you to test their site with a monthly contract or a XX days money back guarantee. From the top of my head, Host gator is such host.

Then when you have that account, try a small script like this (check the path to curl with your host helpdesk or documentation):

<?php$var = echo shell_exec("/usr/bin/curl -L http://www.google.com");?>