Top

URL title finder


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 2 scores)
Date Added  Jul 29, 2008
Last Updated  Jul 29, 2008
Tags  finder  page  site  title  url  web 

Introduction

When somebody posts a link in a channel, this will echo the title of the page to you, so you know what you're clicking on. Only detects links that begin the line, not in the middle (95% of links are posted as their own line)

Grab the Code

on *:text:http*:#:{
  var %a = $iif(*www.* iswm $1- || $count($gettok($1-,2,47),$chr(46)) == 1,$iif(*www.* iswm $1-,$gettok($gettok($1-,2,47),2-,46),$gettok($1-,2,47)),$gettok($1-,2,47))
  set %title.site %a
  set %title.chan #
  if ($chr(47) isin $gettok($1-,2-,46)) && ($gettok($1-,3,47)) set %title.site2 $+($chr(47),$gettok($1-,3-,47))
  sockopen findtitle %a 80
}
on *:sockread:findtitle:{
  if ($sockerr) {
    echo %title.chan Error finding title.
    sockclose findtitle
    unset %title.*
    halt
  }
  else {
    var %', %hee
    sockread %'
    %hee = $z(%')
    if (*<*title>* iswm %') {
      echo %title.chan Title: $remove($strip(%hee),$chr(9))
      unset %title.*
      sockclose findtitle
      halt
    }
  }
}
alias -l z {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}
on *:sockopen:findtitle:{
  sockwrite -n $sockname GET $iif(%title.site2,%title.site2,$chr(47)) HTTP/1.1
  sockwrite -n $sockname Host: %title.site $+ $crlf $+ $crlf
}
 

Comments

  (2)  RSS
DaNzO
Comments: 72
 
mIRC Snippet:  URL title finder
Posted on Jul 31, 2008 12:56 pm
* /sockwrite: 'findtitle' not connected (line 32, script1.mrc)
-
k0ji
Comments: 28
 
mIRC Snippet:  URL title finder
Posted on Aug 1, 2009 11:24 pm
hu uh. not working to me

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom