tags:

views:

52

answers:

1

I'm trying to read an xml response from YQL:

$url = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20woeid%3D%22'.$woeid.'%22';

if (!$xml=simplexml_load_file($url) )
{
   //DO STUFF
}

This code works. Now i'm trying to put my application ID in the url string but I don't know how it should be done.

Thanks.

A: 

I assume that you want to do this in order to authorize your requests; for example, to receive the higher rate limits, etc.?

YQL uses OAuth for authorization rather than simply adding an API key or appID into a request URL. The process is well documented and their code examples covers requests using 2-legged and 3-legged OAuth in both PHP and JavaScript.

Is there any reason why the public (non-authed) service doesn't suit your needs?

salathe
Thanks for your answer. I read thed OAuth part, but someway I thought that an auth ala Google was also possible.I need the auth version because I want to get a lot of data and the 1000 per hour limit is not enough.
earlyriser