I've created a script which retrieves data from Delicious like this:
...retrieve usernames and such...
$username = 'randomUser';
$parentTag = array("tag'12","tag’12"); //note the different quotes being used!
$amount = 100;
foreach ($parentTag as $pTag){
$url = "http://feeds.delicious.com/v2/json/".$username."/".$pTag."?count=".$amount;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
...store data to DB...
}
When manually visiting both links (with the different tags) Delicious displays different data as it treats both as individual/different tags and users have used both types of quotes. When using my script to access the data the first one works but the second one fails and shows no data at all.
I've tried urlencoding and rawurlencoding the tags, manually replacing the curly quote with ’ ; and %92 but to no avail.
So the question is: How can I alter my script to get the JSON data of both tags from Delicious?