Salve a tutti, ho implementato questo codice PhP:
Codice PHP:
$url = "http://prova.jsf";
$post_fields = 'percorsiForm:originAddress' . 'percorsiForm:originCity' . 'percorsiForm:destinationAddress' . 'percorsiForm:destinationCity'; //form Fields.
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL, $url); // Pass URL as parameter.
curl_setopt($ch, CURLOPT_POST, 1); // use this option to Post a form
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); // Pass form Fields.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Return Page contents.
$result = curl_exec($ch); // grab URL and pass it to the variable.
curl_close($ch); // close curl resource, and free up system resources.
echo $result; // Print page contents.
ma quando la eseguo mi da quest'errore:
Fatal error: Call to undefined function curl_init() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prove\proxy.php on line 5
A cosa puo' essere dovuto?
Grazie a chi rispondera'