title: Error HTTP_Request2 in Tesco Api php script
body: <p>Note: Beginner to php and programming on web databases.</p>
  
  <p>I am trying to implement the Tesco API on the 000webhost webhosting site. I've copied the PHP script at <a href="https://devportal.tescolabs.com/" rel="nofollow noreferrer">the Tesco labs page</a>, put it in the database at 000webhost where I call it with the index.php script, however when I tried to implement the code, it gives me this error:</p>
  
  <blockquote>
    <p>Warning: require_once(HTTP/Request2.php): failed to open stream: No such file or directory in /storage/ssd4/772/1967772/public_html/tesco_api.php on line 3</p>
    
    <p>Fatal error: require_once(): Failed opening required 'HTTP/Request2.php' (include_path='.:/usr/share/pear:/usr/share/php') in /storage/ssd4/772/1967772/public_html/tesco_api.php on line 3</p>
  </blockquote>
  
  <p>From the error message, the culprit is this line in the Tescolab API script:</p>
  
  <pre><code>require_once 'HTTP/Request2.php';
  
  $request = new Http_Request2('https://dev.tescolabs.com/product/');
  </code></pre>
  
  <p>Which seems to give an error because of some missing pear installation (don't really understand this)</p>
  
  <p>It seems impossible to install this pear thing on 000webhost, and I've tried searching for workarounds for the HTTP_Request2, such as by using curl, but I can't seem to find a working solution. I also couldn't understand what the comment in the Tesco API meant:</p>
  
  <pre><code>// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
  </code></pre>
  
  <p>If someone could propose a solution to this issue, either with a curl workaround, or by managing to install the pear thing</p>