NOTE: The documentation below assumes either FIXIE_URL or FIXIE_SOCKS_HOST Environment Variables are set. If your application is deployed on either Heroku or Vercel via our official integration, these environments will be set for you.

PHP cURL is the easiest way to get your PHP application working correctly with Fixie. Here's how:

  function proxyRequest() {
    $fixieUrl = getenv("FIXIE_URL");
    $parsedFixieUrl = parse_url($fixieUrl);

    $proxy = $parsedFixieUrl['host'].":".$parsedFixieUrl['port'];
    $proxyAuth = $parsedFixieUrl['user'].":".$parsedFixieUrl['pass'];

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_PROXY, $proxy);
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);

  $response = proxyRequest();

Having issues? Please reach out to our team here.