foursquare-async icon indicating copy to clipboard operation
foursquare-async copied to clipboard

Server side calls via proxy server

Open lleoun opened this issue 14 years ago • 4 comments

I think it is an issue, please correct me if it is not:

My production server needs to make server side calls using a proxy server.

Uploading the working code in my test server to the production server I have a time out connection error. So I have edited EpiFoursquare.php and I have added:

curl_setopt($ch, CURLOPT_PROXY, 'proxy.theproxy.net:8080');

at the end of:

if($method === 'GET') $url .= is_null($params) ? '' : '?'.http_build_query($params, '', '&'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);

Now I have:

Fatal error: Uncaught exception 'EpiFoursquareException' in EpiFoursquare.php:236 Stack trace: #0 EpiFoursquare.php(192): EpiFoursquareException::raise(Object(EpiCurlManager), false) EpiFoursquareJson->__get('access_token') #2 {main} thrown in EpiFoursquare.php on line 236

Thanks

lleoun avatar Apr 13 '11 16:04 lleoun

This problem was reported on the twitter version of this library. I haven't had much f a chance to look at it. Do you have the proxy information which I can use to test this? I presume what's in your code are dummy values.

On Wed, Apr 13, 2011 at 9:16 AM, lleoun < [email protected]>wrote:

I think is is an issue, please correct me if it is not:

My production server needs to make server side calls using a proxy server.

Uploading the working code in my test server to the production server I have a time out connection error. So I have edited EpiFoursquare.php and I have added:

curl_setopt($ch, CURLOPT_PROXY, 'proxy.theproxy.net:8080');

at the end of:

if($method === 'GET') $url .= is_null($params) ? '' : '?'.http_build_query($params, '', '&'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);

Now I have:

Fatal error: Uncaught exception 'EpiFoursquareException' in EpiFoursquare.php:236 Stack trace: #0 EpiFoursquare.php(192): EpiFoursquareException::raise(Object(EpiCurlManager), false) EpiFoursquareJson->__get('access_token') #2 {main} thrown in EpiFoursquare.php on line 236

Thanks

Reply to this email directly or view it on GitHub: https://github.com/jmathai/foursquare-async/issues/17

jmathai avatar Apr 13 '11 17:04 jmathai

Sure, here you go: seldprx06.corpextra.net:8080

Thanks a million in advance!!

lleoun avatar Apr 14 '11 06:04 lleoun

Sorry for the delay responding. Will try to have a look at it this week.

jmathai avatar May 03 '11 02:05 jmathai

That's great, thanks a lot!

lleoun avatar May 04 '11 06:05 lleoun