Forum Moderators: coopster & phranque

Message Too Old, No Replies

proxy through socket in perl

         

jeremy goodrich

5:06 am on Oct 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tried looking for a few minutes through perldoc.com, couldn't find what I need. Looking for the code / way to code a get request from a host through a proxy...thanks. If you could just point me to the right place in the docs even, that'd be fine :)

jeremy goodrich

5:08 am on Oct 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



snip...

if ($use_proxy) {
$server_sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>$proxy,
PeerPort=>$proxy_port, Reuse=>1);
if (! $server_sock) {
print "Error: can't connect to $proxy\n";

how would this work out? Looks good to me...(not my code).

ggrot

5:27 am on Oct 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Out of curiosity, are you trying to do ranking reports without getting your ip banned?

jeremy goodrich

5:33 am on Oct 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hey, that's not a bad idea...is that what you would do? ;)

Brett_Tabke

9:26 am on Oct 26, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You are correct in assuming proxies are difficult through sockets. Best bet is to find some code and study. I know, good socket code is few and far between. You'll have to dig.

I finally gave up and started using libwww all the time. It slow, it's really slow, but it works.

Cyborg

11:29 am on Dec 18, 2001 (gmt 0)



I'm understand how connect to proxy, but I cann't get any page with proxy. May you say, how use proxy arter connect ???