Originally Posted By: The_JD
Originally Posted By: Lpfix5
ON *:SOCKOPEN:forumscan: {
%forumcount = 1
if ($sockerr) { echo -a no connection... | return }
sockwrite -n $sockname GET /discuss/viewforum.php?f= $+ %forumcount HTTP/1.1
sockwrite -n $sockname $crlf
}


Seems like you may have forgotten the HOST (required) - This is because many websites share IP addresses.

Code:
ON 1:SOCKOPEN:forumscan:{
  %forumcount = 1
  if ($sockerr) { echo -a no connection... | return }
  else sockwrite -t $sockname $+(GET /discuss/viewforum.php?f= $+ %forumcount HTTP/1.0,$crlf,Host: www.example.com,$crlf,$crlf)
}


Actually the host was fine this is how I cheated out of making the script the long way I know theres a shorter way

Code:
 
ALIAS forumscan {
  %lsc = 0
  if ($sock(forumscan)) { sockclose forumscan }
  sockopen forumscan www.whateversite.com 80
  .timer 1 2 //forumcheck
  .timer 1 3 //forumscan
}

ON *:SOCKOPEN:forumscan: {
  %forumcount = %forumcount + 1
  if ($sockerr) { echo -a no connection... | return }
  sockwrite -tn $sockname GET $+(/discuss/viewforum.php?f=,%forumcount) HTTP/1.0
  sockwrite -tn $sockname $crlf
}

ON *:SOCKREAD:forumscan: {
  sockread %t
  inc %lsc
}

ALIAS forumcheck {
  if (%lsc < 500) { echo -a SOCKET %forumcount is 4,1FALSE }
  if (%lsc > 501) { echo -a SOCKET %forumcount is 8,1TRUE }
}