Hi all i’m new to YII framework,
I can’t find the class and function for requesting HTTP requests from some web service…
Can someone please assist?
Thanks!
Hi all i’m new to YII framework,
I can’t find the class and function for requesting HTTP requests from some web service…
Can someone please assist?
Thanks!
Actually i did, but does this code for example:
$client=new SoapClient(‘http://hostname/path/to/index.php?r=stock/quote’);
echo $client->getPrice(‘GOOGLE’);
will work for any web service (that is not written in YII)?
Soap is a standard, so will work with any web service (soap).
But then, what should i use instead of “$client->getPrice(‘GOOGLE’);”
I mean that “$client” contain a message, but how do i know it’s content? is it an object that is should know his fields?
$client doesn’t contain a message, but it is the object to communicate with remote service.
Maybe you do not understand what i need, i have a known API for some web service, for example:
http://example.org/api.php?action=name
And i know i should get some data back when requesting…
Anyone?
Maybe you mean
file_get_contents('http://example.org/api.php?action=name');
or using curl.