All that had happened was you'd changed your search URL -

it used to be http://www.tormented.tv/search.php?query=,search+here,&x=0&y=0&search=1
but now it's http://www.tormented.tv/search.php?search=,search+here,&x=0&y=0&srch=1

I also added some code to remove the (new?) Featured videos from showing in the results.

Code:
on *:text:!tsearch*:#:tsearch $nick $2-
alias -l tsearch {
  set %tsearchnick $1
  set %tsearchstring $replace($$2-,$chr(32),+)
  sockopen tsearch tormented.tv 80
}
on 1:sockopen:tsearch:{
  if ($sockerr) { 
    echo 4  -- Socket Error! --
    return
  }
  var %s = sockwrite -n $sockname
  %s GET $+(http://www.tormented.tv/search.php?search=,%tsearchstring,&x=0&y=0&srch=1) HTTP/1.1
  %s Referer: tSearch-mIRC-script(User: $+ $me $+ )
  %s Host: tormented.tv
  %s Content-Type: application/x-www-form-urlencoded
  %s Connection: Keep-Alive
  %s Cache-Control: no-cache
  %s
}
on 1:sockread:tsearch:{
  if ($sockerr > 0) return
  :nextread
  sockread %temp
  if ($sockbr == 0) return
  if (%temp == $null) %temp = -
  ;  echo 04 -s %temp
  if *<b>* - Not Found</b></div>* iswm %temp {
    notice %tsearchnick 04 $nohtml(%temp)
    sockclose tsearch
    unset %tsearch*
  }
  elseif <a href='video.php? isin %temp {
    notice %tsearchnick 03 $remove($gettok(%temp,6,39),images/,.jpg) (12http://www.tormented.tv/ $+ $gettok(%temp,2,39) $+ 03)
  }
  elseif *<font face='Georgia'><a href='search.php?query=*&p=2* iswm %temp {
    notice %tsearchnick 03 More results available try 12http://www.tormented.tv/search.php?query= $+ %tsearchstring $+ &p=203 for more
  }
  elseif "Featured Videos" isin %temp {
    sockclose tsearch
    unset %tsearch*
  }
  elseif %temp { noop }
  else {
    sockclose tsearch
    unset %tsearch*
  }
}
alias -l nohtml {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ,$chr(9))
  return %x
}

Last edited by billythekid; 29/11/08 05:52 PM.

billythekid