vendredi 6 mars 2015

Accessing Import.io API through a proxy server

I am currently having some issues using the import.io API. The issue regarding the fact despite my app being used and deployed in the UK it will return (fort certain stores) incorrect currencies and price data due toe Import.IO's servers being deployed in the US. I spoke with the support team there who helpfully informed me I could host a proxy server to the Import API.


Now I am a complete beginner at server set ups etc however I managed to get an AWS instance running and have installed Squid as a proxy server. I changed my Firefox connection settings and have successfully managed to browse the web via this proxy server (also verified whats my ip was the IP of my server)


However I am not entirely sure how exactly I am meant to call the Import library from within my application.


The application is built in PHP and a current example of how I would generate a URL to call call would be:



public function generateCall( $import_key, $url )
{
return sprintf(
'http://ift.tt/1G6ChS3',
$import_key, urlencode( $url ), self::$apikey
);
}


As you can see here I am calling the api.import.io server directly. Any help would be greatly appreciated.


As advised I am a complete beginner at server side set ups etc.





Aucun commentaire:

Enregistrer un commentaire