Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading an internet page

Status
Not open for further replies.

stillnew2perl

Programmer
Jun 21, 2007
6
0
0
US
Ok, so I got my AIMBOT working!!!

But when I receive instant messages, they are displayed in html. So it got me thinking, could I view an entire web PAGE in it's html source form in perl and read off of it???

Thanks!!!
 
Sounds possible.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
A neat trick I used to use in my AIM bot days...

Code:
$msg =~ s/<(.|\n)+?>//ig; # strip all HTML out

-------------
Cuvou.com | My personal homepage
Project Fearless | My web blog
 
Same way you'd read in any other file.

Code:
open (LOCAL_FILE, "./test.html");
my @html = <LOCAL_FILE>;
close (LOCAL_FILE);

########

use LWP::Simple;
my $remote_html = get "[URL unfurl="true"]http://www.tek-tips.com/index.cfm";[/URL]

-------------
Cuvou.com | My personal homepage
Project Fearless | My web blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top