Seb
Seb

Reputation: 83

No EU Groupon API Results

For some reasons I can't print any results from the European Groupon API feeds while the US feed works fine:

The US feed URL can be found on the US Groupon site - see: https://partner-api.groupon.com/help/deal-api (Scroll down to "Location Sample Calls").

See below my PHP code to print the results from the US feed in XML, this works fine i.e. I can print the results from the Groupon API.

<?php
$xml=simplexml_load_file("https://partner-api.groupon.com/deals.xml?tsToken=US_AFF_0_201236_212556_0&division_id=amarillo&offset=0&limit=10") or die("Error: Cannot create object");
print_r($xml);
?>

Now when I try one of the European countries feed with exactly the same code, I cannot print any results and I have the following error: Error: Cannot create object.

For the EU, The feed URL can be found on the EU Groupon site - see: https://partner-int-api.groupon.com/help/deal-api (Scroll down to "Location Sample Calls").

See below my PHP code to print the results from the IE feed in XML, this does not work while the code is exactly the same as the US above, what's strange is that it works in Xampp, and it also works if you call the IE feed URL in a browser. But I can't print any results when I put that piece of code below on my server and call it in my browser while it works fine with the US.

Thanks for your help.

<?php
$xml=simplexml_load_file("https://partner-int-api.groupon.com/deals.xml?country_code=IE&tsToken=IE_AFF_0_200012_212556_0&division_id=dublin&offset=0&limit=20") or die("Error: Cannot create object");
print_r($xml);
?>

Upvotes: 0

Views: 153

Answers (0)

Related Questions