C
canes_venatici
Hi -
I'm new to CGI and perl. I am trying to write a script that will read
in the source of a webpage on an external server, look for a specific
string, and then output based on the presence of that string. I've
tried using a pipe to get this done but haven't got it to work. I
can't figure out how to read in the source from an external web page.
Example: lets say i want to read in the source code from
http://www.google.com and look for a string in that code.
I've tried
open (HTML, "http://www.google.com") || print "Can't open page";
$temp_var = <HTML>;
close(HTML);
My output is ALWAYS "Can't open page". I've tried opening to
"http:\/\/www.google.com" with the same results... Am i formatting it
wrong? Is there another way to do this? Is this even possible?
Again this is only an example... i will be doing this on an Internal
and internal server only.. i just used www.google.com as an example.
any help is surely welcome.
Austin
(e-mail address removed)
I'm new to CGI and perl. I am trying to write a script that will read
in the source of a webpage on an external server, look for a specific
string, and then output based on the presence of that string. I've
tried using a pipe to get this done but haven't got it to work. I
can't figure out how to read in the source from an external web page.
Example: lets say i want to read in the source code from
http://www.google.com and look for a string in that code.
I've tried
open (HTML, "http://www.google.com") || print "Can't open page";
$temp_var = <HTML>;
close(HTML);
My output is ALWAYS "Can't open page". I've tried opening to
"http:\/\/www.google.com" with the same results... Am i formatting it
wrong? Is there another way to do this? Is this even possible?
Again this is only an example... i will be doing this on an Internal
and internal server only.. i just used www.google.com as an example.
any help is surely welcome.
Austin
(e-mail address removed)