I need to know how to set my own remote_addr when requesting pages from the web.
I seem to be out of answers on how to do this.
When the page I request sends out its $ENV_ variables :"SO I MAY CHECK IT OUT" it says the "REMOTE_ADDR" is one of my WEB SERVER IP'S, not me or what I set. I don't want this I want it to either be mine or set my own preferably.
Ohh, and when I set my own it adds a "environment var" called HTTP_REMOTE_ADDR. "still not what i want."
Sample:
#!/usr/bin/perl use LWP::UserAgent; use HTTP::Headers; my $theurl = "http://www.foo.com"; $h = new HTTP::Headers( Content_Type=>'text/html, text/plain, image/*', Accept=>'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, applicat +ion/vnd.hp-hpf, */*', Accept_encoding=>"gzip, deflate", Accept_language=>"en-us", Connection=>"Keep-Alive", remote_addr=>'123.456', ); $ua = LWP::UserAgent->new; $request = HTTP::Request->new(GET => $theurl, $h); $ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90 +)"); $response = $ua->request($request); if ($response->is_success) { print "Content-Type: text/html\n\n"; print $response->content; } else { print "Error: " . $response->status_line . "\n"; } );

I've tried adding/deleting some of the following:
$request->header('Accept'=> 'text/html','Type' => 'text/html','remote_ +addr'=>'123.456'); print $q->header(-Type=>'text/html',-Accept=>'text/html',-remote_addr= +>'123.456.789');#under $q use CGI of course tried remote_addr, Addr, and REMOTE_ADDR on above

Does anyone have a way a accomplishing this?

Thanks,
iamsteve

In reply to setting remote_addr in header so my server IP isn't the address by iamsteve

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.