1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

getting a website through a proxy in perl/php?

Discussion in 'PHP & Perl' started by ortal, Dec 8, 2008.

  1. ortal

    ortal Junior Member

    Joined:
    May 27, 2008
    Messages:
    106
    Likes Received:
    10
    I saw many items on using $ua->proxy but couldn't find how to use it.
    I run Perl in ActivePerl and Php on my a web server and at least in regard to the first part I saw several differences - things that work in ActivePerl were not compiled on PerlExpress (something related to the virtual browser) and scripts from the web didn't run on my ActivePerl.
    I will be thankful for any help.
     
  2. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Look for LWP::UserAgent on CPAN.org, that should give you the examples you are after.
    Failing that, Google for LWP::UserAgent and you will get lots :)
     
  3. ortal

    ortal Junior Member

    Joined:
    May 27, 2008
    Messages:
    106
    Likes Received:
    10
    I saw these lines:
    $ua->proxy(['http', 'ftp'], 'http://proxy.sn.no:8001/');
    $ua->proxy('gopher', 'http://proxy.sn.no:8001/');

    but all I've got is a proxy IP - where does it belong in all this?