This script basically, checks the Title, Description and website Keywords, that why i put it as ''website content checker''
some websities does not contain, title, description or keywords
(example google) , so you're gonna receive a message like this
unable to find all the data from http://www.google.com
the command is
!check http://www.example.com
[00:23:54] <~Teen> !check http://www.hawkee.com
[00:23:56] Title: Hawkee Technology Social Network
[00:23:56] Keywords: hawkee, platforms, scripts, snippets, social network, social software, computers, electronics, video games
i was trying to return an error, so i asked for FordLawnmower help
Thanks
on $*:text:/^!check\s.*/iS:#:{
if (%Floods) { notice $nick 4You need to wait 10 seconds till you do this command again | return }
if ($sock(check)) sockclose check
if $regex($2-,/(http://(.+)|www\.(.+))/) && (!%Floods) {
set -u5 %Pageall $regml(1)
var %Pagehost = $iif(*http://* iswm %Pageall, $gettok(%Pageall, 2, 47), %Pageall)
sockopen check %Pagehost 80
sockmark check $chan %Pagehost
$iif($regex(%Pageall,/\w/(.+)/), set -u5 %Pagelink $+(/,$regml(1),), set -u5 %Pagelink $chr(47)))
inc -u10 %Floods
}
else {
msg $chan 4ERROR: Valid link is necessary for this http://www.example.com | halt
}
}
on *:Sockopen:check:{
if ($sockerr) { msg $gettok($sock(check).mark, 1, 32) 4ERROR: Unable to connect on $+($gettok($sock(check).mark,2, 32),:) $sock(check).wsmsg }
else {
sockwrite -n $sockname GET %Pagelink HTTP/1.1
sockwrite -n $sockname Host: $gettok($sock(check).mark, 2, 32)
sockwrite -n $sockname $crlf
}
}
on *:sockread:check:{
var %Check , %Chans msg $gettok($sock(check).mark, 1, 32)
sockread %Check
if ($regex(%Check,/<title>([^<]*)</title>/i)) { %Chans 7Title: $regml(1) | sockmark $sockname $sock($sockname).mark 1 }
elseif ($regex(%Check,/keywords[^<]*content=["']([^'"<]+)["']/i)) {
if ($regml(1)) { %Chans 12Keywords: $regml(1) | sockmark $sockname $sock($sockname).mark 1 }
}
elseif ($regex(%Check,/description[^<]*content=["']([^'"<]+)["']/i)) {
if ($regml(1)) { %Chans 6Description: $regml(1) | sockmark $sockname $sock($sockname).mark 1 }
}
elseif (</head> isin %Check) {
if (!$gettok($sock($sockname).mark,3,32)) %Chans 4unable to find all the data from %Pageall
}
}
Not to say anything out of line here, its creative but whats the point of this snippet. meaning it would be nice if it gave you the newly added topics in front page or etc. Ive tried it and all works.
[01:13pm] <@chain> !check http://www.irchainscriptz.net
[01:13pm] <@B0tS3rv> unable to find all the data from http://www.irchainscriptz.net
[01:13pm] <@B0tS3rv> Keywords: The Front Page, vBulletin 4.0, CMS
[01:13pm] <@B0tS3rv> Description: vBulletin 4.0 Publishing Suite with CMS
[01:13pm] <@B0tS3rv> Description: vBulletin 4.0 Publishing Suite with CMS
[01:13pm] <@B0tS3rv> Title: IRChainScriptz - The Front Page
[01:13pm] <@chain> !check http://www.TG007.net
[01:13pm] <@B0tS3rv> Description: TechGear007 is an online community resource site.
[01:13pm] <@B0tS3rv> Keywords: free downloads,mirc help,mirc,mirc scripts,irc,buzzen,sparkpea,koach,msn,bots,scripts,ircd,chat,chat clone,err0r,ozzy10,techgear,techgear007,tg007,buzzen,phreik,koach,sparkpea
[01:13pm] <@B0tS3rv> Title: TG007.net Community Resource Site