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: Intermediate:
how do i get data from an url with CGI?

 



menchen
User

Feb 25, 2000, 6:57 AM

Post #1 of 4 (726 views)
how do i get data from an url with CGI? Can't Post

if given an url, how do i get data from that url and store it on a variable.

example: given url www.yahoo.com, i would like to use CGI to get the all the output of www.yahoo.com and store it on a variable.

thank you


Cure
User

Feb 25, 2000, 3:48 PM

Post #2 of 4 (726 views)
Re: how do i get data from an url with CGI? [In reply to] Can't Post

Hi menchen

example::

#!/usr/bin/perl
use LWP::Simple;
print "Content-type: text/html\n\n";
$content = get("http://www.yahoo.com");
print "$content\n";


Cure

[This message has been edited by Cure (edited 02-25-2000).]


menchen
User

Feb 28, 2000, 7:03 AM

Post #3 of 4 (726 views)
Re: how do i get data from an url with CGI? [In reply to] Can't Post

thanks so much cure, you just saved my ass. Smile


Cure
User

Feb 28, 2000, 9:12 AM

Post #4 of 4 (726 views)
Re: how do i get data from an url with CGI? [In reply to] Can't Post

Your Welcome Menchen

Cure

 
 


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

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