CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Parse help .. and more.

 



Always IN Chaos
Novice

Feb 13, 2003, 10:08 AM

Post #1 of 6 (577 views)
Parse help .. and more. Can't Post

How do you set $ENV('HTTP_Referer') path ?

what would the conde be to parse the query(sp??) string at the end of a url.


Paul
Enthusiast

Feb 13, 2003, 10:36 AM

Post #2 of 6 (568 views)
Re: [Always IN Chaos] Parse help .. and more. [In reply to] Can't Post

How are you trying to set it?...for a remote request?

The query string is $ENV{QUERY_STRING}


Melvosh
User

Feb 13, 2003, 10:39 AM

Post #3 of 6 (568 views)
Re: [Always IN Chaos] Parse help .. and more. [In reply to] Can't Post


Quote
How do you set $ENV('HTTP_Referer') path ?



Make sure you are following a link. HTTP_REFERER will have a value of (none) if you access a URL by typing it into the address bar. If you are looking to change the existing value, I believe there is a way to modify environmental variables, but I'm not 100% sure how.


Quote


what would the conde be to parse the query(sp??) string at the end of a url.



You can use the "param" function from [url="http://www.perldoc.com/perl5.8.0/lib/CGI.html"]CGI.pm, which is included in the standard Perl distribution.


"...there's some good in this world, Mr. Frodo, and it's worth fighting for." - Samwise Gamgee, The Two Towers


Always IN Chaos
Novice

Feb 13, 2003, 10:47 AM

Post #4 of 6 (566 views)
Re: [Always IN Chaos] Parse help .. and more. [In reply to] Can't Post

aight...

how would you include $ENV('HTTP_REFERER') to a LWP Useragent post ..


Paul
Enthusiast

Feb 13, 2003, 11:21 AM

Post #5 of 6 (566 views)
Re: [Always IN Chaos] Parse help .. and more. [In reply to] Can't Post

Read the pod :)

Or...

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=320&lngWId=6


Always IN Chaos
Novice

Feb 13, 2003, 12:02 PM

Post #6 of 6 (563 views)
Re: [Paul] Parse help .. and more. [In reply to] Can't Post

Thanks for that link paul ;)

Some genral questions on this code..

print "Content-Type: text/html\n\n";
My $url = "Http://www.yahoo.com";
use LWP::UserAgent;
use HTTP::Request::Common qw(GET POST);
my $agent = LWP::UserAgent->new;
my $reg = GET $url, Referer => "Http://www.perl.com";
#Http://www.perl.com is your Referer
print $agent->request($req)->as_string;


could ya possibly discribe each of these variables, and if I could rename em to be more discriptive to what i am doing or do they NEED to be that.

Thxs for putting up with my nOObness, i've actually picked up alot ( in a realitive sence, lol) TY!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives