mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2011
Posts: 9
S
Skeelol Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: May 2011
Posts: 9
Just need a script that will grab the page title from a link posted in channel. Cannot find a working script on the googles.

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Code:
alias test {
  if ($sock(test)) { sockclose test }
  sockopen test forums.mirc.com 80
}
;https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/253270/gonew/1/Anybody_have_a_simple_page_tit
on *:sockopen:test: {
  if ($sockerr) { sockclose $sockname | return }
  var %u = 
  sockwrite -nt $sockname POST /ubbthreads.php/ubb/showflat/Number/253270/gonew/1/Anybody_have_a_simple_page_tit HTTP/1.1
  sockwrite -nt $sockname Host: $sock($sockname).addr
  sockwrite -nt $sockname User-Agent: Mozilla/*
  sockwrite -nt $sockname Connection: keep-alive
  sockwrite -nt $sockname $crlf
}

on *:sockread:test:{
  if ($sockerr) { sockclose $sockname | return }
  sockread %temp
  if ($sockbr) { 
    if (<title> isin %temp) { echo -ag READ: %temp }
  }
}


Dont give a fish - teach to fish!
Joined: May 2011
Posts: 9
S
Skeelol Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: May 2011
Posts: 9
Ok so this alias will retrieve the title of this page which is a good start, however I'm going to need to come up with something to run it on any URLs starting with http:// or https:// posted to channel. Any other threads or scripts that I could use for a guideline?

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249


Dont give a fish - teach to fish!

Link Copied to Clipboard