Ok, 2 questions to annoy the advanced perl monk.
1)Anyone know why a "clicked" link from a site using "https" is not showing up in the $ENV{HTTP_REFERER} variable?
(eg. https://perl.com -users clicks on hyperlink to http://perlmonkks.org but sends no REFERER Variable)
2)Does anyone know a way of using LWP, HTTP::REQUEST, Basic credentials to obtain a web page if its using "https"? I want to check mail setting the URL and "credentials" and send it to my screen but, the URL is "https://"
This is sample code for question 2.
#!/usr/bin/perl
use LWP;
use HTTP::Headers;
$myurl = "https://www.somewhereoutthereusinghttps.com/blah";
$h = new HTTP::Headers(Referer => $myurl);
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET, $myurl, $h);
$req->authorization_basic('what', 'password');
my $response = $ua->request($req);
print $response->headers_as_string;
print "\n";
print $response->content;
It seems to either give an error or the screen is blank
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.