Php and webservicesx

  1. Check the below website
  2. What I need is to know how php can address a webservice and get information from xml files.
  3. You can try currency converter webservice, or weather, or country codes.

“how to use php and XML in order to talk to webservices and get results.”

In other words, I want a php file that sends for example two variables (e.g. USD, EGP) to the xml webservice, and you get in a the next php file the results 5.514
Check the demo in this page, scroll down till you see the two fields

You may make request like this

$ar[‘CityName’] = “Honiara”;
$ar[‘CountryName’] = “Solomon Islands”;

$postdata = http_build_query($ar);

$opt[‘http’][‘method’] = “POST”;
$opt[‘http’][‘header’] = “Content-type: application/x-www-form-urlencoded”;
$opt[‘http’][‘content’] = $postdata;

$context = stream_context_create($opt);
print $result = file_get_contents(“”,false,$context);

You may go for nusoap to make soap request.

Just me? I can’t even get to your site… Doesnt load

same for me…
i tried but links didnt opened…
but one thing i can say is…
the notion of using web service is not using function like curl and get_file_contents (if it is then case,then it would be called scrapping rather than using web service)
so may be right idea is
include there file (normally single)
then make function call that has been provided in their documentation

i could not open the link so cannot say any thing