I am building a yql url for a script. I have made parts of the url variables and then just reconstructed them together. This is just in case anything changes then I can make an easy fix.
$cllrssformat gets the rss feeds that are in the yql url. I have replaced the search term with the variable $clsearch and stored that in mysql table. I was expecting that it would write the value of $clsearch, but it only shows $clsearch (literally).
This is an example of what I have stored in the mysql table.
'http://daytona".$clsearch."','http://keys".$clsearch."'
And this is the PHP code.
// link to yql
$yqlurl = 'http://query.yahooapis.com/v1/public/yql?q=';
// yql query
$yqlquery = 'select title,source,description,date from rss where url in ( ';
// cl search parameters
$clsearch = '.somesite.com/search/sss?query=blah+blah&srchType=T&minAsk=&maxAsk=&format=rss';
// yql sort paramaters
$yqlparams = ' ) | unique(field="source") | sort(field="date", descending="true")';
// cl rss feeds formatted for yql
$clrssformat = mysql_query("SELECT url FROM be_yqlurls WHERE id='1'");
$temp = mysql_fetch_row($clrssformat);
$clrssformat = $temp[0];
// create the full url
$fullurl= $yqlurl.$yqlquery.$clrssformat.$yqlparams;
$fullurl = rawurlencode($fullurl);
echo rawurldecode($fullurl)
// echo '<br><br>'.$fullurl;
This is the output. Obviously needing the value of $clsearch vs. "$clsearch".
http://query.yahooapis.com/v1/public/yql?q=select title,source,description,date from rss where url in ( 'http://daytona".$clsearch."','http://keys".$clsearch."','http://fortlauderdale".$clsearch."','http://fortmyers".$clsearch."','http://gainesville".$clsearch."','http://cfl".$clsearch."' ) | unique(field="source") | sort(field="date", descending="true")
First real try with PHP so be easy. :) Thanks