0

Got 2 (Wordpress) sites on 2 different servers (with 2 different hosting partners)

I used to be able to call the 4sq API on BOTH servers without using the OAuth method with no issues whatsoever.

Last week , on one server, I got an error (unspecified) and the 4sq routine I had written in PHP stopped working.

PHP code used :

 $response = wp_remote_get( 'https://api.foursquare.com/v2/venues/<venueid>?client_id=<client-id>&client_secret=<client-secret>&v=20120408' );
                        if( is_wp_error( $response ) ) {
                           echo 'Something went wrong!';
                        } else {
                           echo 'Response:<pre>';
                           print_r( $response );
                           echo '</pre>';
                        }

Has to be something that Foursquare is suddenly blocking my site (the one that is not working anymore obviously) to make calls to it's API for some reason.

It cannot be an overload , cause my site has under a hundered visitors A DAY (for now).

Already sent an email to api[at]foursquare.com but did not get a response from them (also not through twitter)

Any ideas ? Any easy (not OAUTH) PHP routines I can use to get a more significant Error message back from 4sq , so I can see what's wrong ?

Any way to contact Foursquare so they reply to my request ?

thanx

Wayfarer
  • 620
  • 6
  • 16
  • What is the response you get from the API? It could be a connection problem rather than a foursquare problem, let's try and discount that first. – Matthew Rathbone Apr 09 '12 at 15:35
  • @MatthewRathbone `&client_secret="; $str = file_get_contents($url); $val = json_decode($str); print_r($val); ?>` put (only) that in a php file, uploaded it to 1) http://hotelraiders.com/4sqapi.php and 2) http://koffiebars.be/4sqapi.php Works on 1) , connection timeout on 2) – Wayfarer Apr 09 '12 at 21:48

1 Answers1

0

It could be possible that your hoster has changed some server settings or their network configuration. Can you access other services from that server? In both cases, you should ask your hoster.

diewie
  • 754
  • 4
  • 8
  • update : After a lot of emailing, calling, it really seems to boil down to a hosting issue. They seem to be blacklisting a part of the IP range of the 4sq servers. Got this from Foursquare debug team: "We're hosted out of EC2 --US East. We don't use a fixed set of IPs for API responses, but Amazon servers are in the IP ranges documented @ [link](https://forums.aws.amazon.com/ann.jspa?annID=1408)" – Wayfarer May 03 '12 at 13:33