title: Accessing Import.io API through a proxy server
body: <p>I am having issues using the import.io API. </p>
  
  <p>Despite my app being used and deployed in the UK it will return (for 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 that I could host a proxy server to the Import API.</p>
  
  <p>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 that my ip was the IP of my server)</p>
  
  <p>However I am not entirely sure how exactly I am meant to call the Import library from within my application.</p>
  
  <p>The application is built in PHP and a current example of how I would generate a URL to call would be:</p>
  
  <pre><code>public function generateCall( $import_key, $url )
  {
      return sprintf(
          'https://api.import.io/store/data/%s/_query?input/webpage/url=%s&amp;_user=XXXX&amp;_apikey=%s',
          $import_key, urlencode( $url ), self::$apikey
      );
  }
  </code></pre>
  
  <p>I am calling the api.import.io server directly.</p>