I'm using this PHP function to collect some pricing information from a website.

The issue is, the currency on the website when I visit it is NZD but my server is in America and when it's collects the information it collected in USD.

Can I pass anything into the php function to say it's in another location?

    That depends entirely on how the other website operates. If it uses request headers then you'll supply a context to file_get_contents to include the headers.

      Yes I'm not sure either, I can see in developer tools, there is a cookie called "currency" however I can't seem to override this.

      $opts = array(
          'http'=>array(
            'method'=>"POST",
            'header'=>array("Accept-language: en",
                                   "Cookie: currency=EUR",
                                   "Custom-Header: value")
          )
        );
        
      $context = stream_context_create($opts);
      
      $file = file_get_contents($url, false, $context);
      echo $file;
        Write a Reply...