It's not about wanting and needing, but about sharing and contributing. So I'll help you out a little with this "working" script.
You'll have to change some things to get it working entirely with just perl instead of using system calls ;).
So it's up to you to:
To speak with the unforgettable words of Janice Joplin, "Try-ha-ha-ha-ha, just a little bit harder".
#!/usr/bin/perl -w #popuppagechecker.pl $url = "empty";#;) if ($ARGV[0]) { $url = $ARGV[0]; } if ($url eq "empty"){ print "Specify url like popuppagechecker.pl http:\/\/www.makemyhomewor +k.com\n"; exit; } open TEL, "lynx -source $url|"; @text = <TEL>; $darnpopup = "false"; # teabags full report ;) print "@text\n$url"; foreach $line(@text){ if ($line =~ m/window.open/g){ print " probably has popups, (or some other lame javascript....)\n"; $darnpopup = "true"; } } if ($darnpopup ne "true"){ print " probably has no popups\n"; }
Hmm, I just realised fixing the above code sounds even like more homework then you're in for! hehe...
Teabag
Sure there's more than one way, but one just needs one anyway - Teabag
In reply to Re: Check for popups in webpage
by teabag
in thread Check for popups in webpage
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |