WEB Runnig PHP script through a proxy.

Discussion in 'OT Technology' started by rodman8600, Jan 23, 2009.

  1. rodman8600

    rodman8600 OT Supporter

    Joined:
    Sep 6, 2003
    Messages:
    13,541
    Likes Received:
    5
    Location:
    South Bay, CA
    The thread title pretty much describes it.

    I've been working on a script for the past few weeks and after careful consideration I've come to the conclusion that it would be in my best interest to run this certain piece of software through a proxy.

    Is anyone aware of a set of function libraries that already exist that will help me accomplish this or could someone point me in the right direction?

    I've been searching google for the last few hours but everything just returns overpowered PHPProxy scripts.

    PHP 5.2.5
    Apache 2.0.63
    PHP/CURL 7.18.0
     
  2. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    Need more info. A bit unclear whether you want the PHP script to act as a proxy, or do a reverse proxy to that PHP script. Sounds dodgy to me!
     
  3. rodman8600

    rodman8600 OT Supporter

    Joined:
    Sep 6, 2003
    Messages:
    13,541
    Likes Received:
    5
    Location:
    South Bay, CA
    Very dodgy.

    I'd like the php script itself and only the script to run through a proxy.

    An option is to run it on a box from my house and just route all the traffic from that machine through a proxy, but I'd rather not even deal with the traffic/transactions that are going to go down.
     
  4. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    So the PHP script is requesting web resources of some kind and you want those requests to go through a proxy?

    If so, you can use CURL to do that, check out: http://www.php.net/curl_setopt
     
  5. rodman8600

    rodman8600 OT Supporter

    Joined:
    Sep 6, 2003
    Messages:
    13,541
    Likes Received:
    5
    Location:
    South Bay, CA
    You hit the nail right on the head, CURLOPT_HTTPPROXYTUNNEL is exactly what I was looking for, just didn't know what it was called.

    tyvm
     

Share This Page