mIRC Homepage

forum socket script

Posted By: Lenooox

forum socket script - 19/01/12 05:41 PM

hello everyone!
someone can tell me why it does not work my forum socket script?
thank you

Code:
alias insane_check {
  if (%insane_nick) { $iif(%insane_chan,msg %insane_chan,echo -a) [4Error]: Cannot proceed, Please wait an other user  $+ $qt(%insane_nick) $+  is already using this feature! - 4FAILED | halt }
  sockclose insaneforum
  sockopen insaneforum www.insanescripting.comze.com 80
  set -eu60 %insane_chan $chan
  set -eu60 %insane_nick $nick
  set -eu60 %insane_ticks $ticks
  $iif(%insane_chan,msg %insane_chan,echo -a) [ $+ $iif(%insane_nick,$v1,WARNING) $+ ] Your command has been proceed, Please wait Receiving data...
}

ON *:TEXT:!insaneusers:#: { insane_check }
ON *:SOCKOPEN:insaneforum: {
  if ($sockerr > 0) { $iif(%insane_chan,msg %insane_chan,echo -a) [4Error]: Connection problem, Cannot conect to read any information now from the $qt(Insane Site) server, check your internet connection, or maybe there is an server connection problem, try again later! - 4FAILED | sockclose $sockname | return }
  sockwrite -n $sockname GET /news.php HTTP/1.1
  sockwrite -n $sockname Host: www.insanescripting.comze.com
  sockwrite -n $sockname User-Agent: */* 
  sockwrite -n $sockname Connection: Close
  sockwrite -n $sockname $crlf
}
ON *:SOCKREAD:insaneforum: {
  if ($sockerr > 0) { $iif(%insane_chan,msg %insane_chan,echo -a) [4Error]: Connection reading problem, Cannot read any information now from the $qt(Insane Site) server, try again later! - 4FAILED | sockclose $sockname | return }
  var %read
  sockread %read
  if (*Guests Online:* iswm %read) { set -e %insane_guests $gettok($remove(%read,<br),9,32) }
  if (*Members Online:* iswm %read) { set -e %insane_members $gettok($remove(%read,<br),9,32) }
  if (*Total Members:* iswm %read) { set -e %insane_total $gettok($remove(%read,<br),9,32) }
  if (*Newest Member:* iswm %read) { set -e %insane_new_member $gettok($remove(%read,class='side'>,</a>),11,32) }
}
ON *:SOCKCLOSE:insaneforum: {
  $iif(%insane_chan,msg %insane_chan,echo -a) [ $+ $iif(%insane_nick,$v1,WARNING) $+ ] The reading progress has been finished! - GUESTS ONLINE:  $+ $iif(%insane_guests,$v1,N/A) $+  - MEMBERS ONLINE:  $+ $iif(%insane_members,$v1,N/A) $+  - TOTAL ONLINE USERS:  $+ $iif(%insane_total,$v1,N/A) $+  - NEWEST MEMBER:  $+ $iif(%insane_new_member,$v1,N/A) $+  - TOOK:  $+ $calc(($ticks - %insane_ticks) / 1000) $+  second(s) - 3SUCCESSFULLY 
  unset %insane_*
}
Posted By: zantetsuken

Re: forum socket script - 19/01/12 08:24 PM

Code:
sockopen insaneforum www.insanescripting.comze.com 80


just a quick look over, i don't think you need the www. in the sockopen. just use insanescripting.comze.com (i could be wrong though) see if that helps
Posted By: Lenooox

Re: forum socket script - 19/01/12 10:36 PM

i tried to change but nothing not work frown
nothing error or other
i got only this :
The reading progress has been finished! - GUESTS ONLINE: N/A - MEMBERS ONLINE: N/A - TOTAL ONLINE USERS: N/A - NEWEST MEMBER: N/A - TOOK: 0.844 second(s) - SUCCESSFULLY
Posted By: zantetsuken

Re: forum socket script - 19/01/12 10:54 PM

I just looked at that site and i don't see anything that shows members online.. probably why it's not working
Posted By: Lenooox

Re: forum socket script - 03/02/12 09:24 PM

nobody cant help me? :S
© 2019 mIRC Discussion Forums