$url = 'http://www.webservicex.net//country.asmx/GetCountries?';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, '');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
echo '<br><br>'.$result.'<br><br>';
$xml = simplexml_load_string($result);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
print_r($array);
In the HTML File, how should the Select go?
Country List:
<select id="campoPais" name="campoPais">
</select>
to call the countries of the WSDL.