Hi all,
im trying to write a site that uses a yahoo api to access product
data...and as a first pass im just trying to create a test page that
pulls data based on a upc I have on a box on my desk...anyways, the
code i use is simply:
$yahooID="WQEKr67V34FYAoAdbaLr10PRTxYcHtWoOgv7yqPvJeTp5DEIh0A.cKuI3O_bi5fRnA4GSB\
nrd0g-";
$upc="606449028423";
$url="http://shopping.yahooapis.com/ShoppingService/v2/CatalogListing?idtype=upc\
&idvalue=$upc&output=php&appid=$yahooID";
echo "$url<BR>";
$rawdata = file_get_contents($url);
$data = unserialize($rawdata);
print_r($data);
The problem is it doesnt work! All it returns is this:
http://shopping.yahooapis.com/ShoppingService/v2/CatalogListing?idtype=upc&idval\
ue=606449028423&output=php&appid=WQEKr67V34FYAoAdbaLr10PRTxYcHtWoOgv7yqPvJeTp5DE\
Ih0A.cKuI3O_bi5fRnA4GSBnrd0g-
Array ( [__notags] => The following errors were detected: [Message] =>
Array ( [0] => User-agent not valid ) )
Yet if I just copy that url into my browser window and go to it, it
returns the results correctly and just fine...what am I doing wrong
here??? (Ive copied and pasted the appid many times from the my yahoo
page, and had new ones created, and disabled them and reenabled them,
nothing works).