Curl_init as well as CURLOPT_URL don't like to have static strings as parameter.
I came across this by accident and it took me very long to find out. curl_exec will throw error 3 (Malformed) and you tipple check the URL in it's variable only to find by trial and error that it's declaration is the culprit.
So never do this:
static $someurl = "http://www.example.com/interfacce.php";
....
$ch=curl_init($someurl);
....
$return=curl_exec($ch);
Cheers