here is a fast mock up of a POST socket for the tinyurl
it is best if you are going to use a regex not to use a greedy one^^
alias turltest {
if ($sock(turl)) sockclose turl
sockopen turl tinyurl.com 80
sockmark turl $$1 $replace($2-,$chr(32),+)
}
on *:sockopen:turl:{
var %turl $+(&url=,$gettok($sock(turl).mark,1,32),&submit=Make+TinyURL!$&
&alias=,$iif($gettok($sock(turl).mark,2,32),$v1,"")),$&
%turl2 = sockwrite -n turl
%turl2 POST /create.php?source=indexpage HTTP/1.0
%turl2 Host: $sock(turl).addr
%turl2 Content-Type: application/x-www-form-urlencoded
%turl2 Content-Length: $len(%turl)
%turl2 $+($crlf,%turl)
}
on *:sockread:turl: {
var %turl | sockread %turl
if ($regex(%turl,/<blockquote.+>(.+?)<\/b>/)) {
echo -a $regml(1)
sockclose turl
}
}
But it would be better to use tinyurls api this is from them not me...
DON'T SCREEN-SCRAPE, PLEASE CONTACT US TO FIND OUT HOW TO USE OUR API