| Author |  Topic  | 
              
                | eiderStarting Member
 
 
 
                1 Posts | 
                    
                      |  Posted - 23 January 2009 :  07:10:41     
 |  
                      | I successfully impletemented the script Had to use Set xml = Server.CreateObject("Microsoft.XMLHTTP")
 as well as Set xmlDoc = Server.CreateObject("Microsoft.XMLHTTP")
 but it seems to work ...
 
 As our forum is quite young, we do not have that much spammers yet.  However, in the 2 weeks it has been up and running, we had 2!  One even minutes after I uploaded it!
 
 Let's hope this helps.
 
 Many thanks<
 |  
                      | D Clark
 |  
                      |  |  | 
              
                | PodgeSupport Moderator
 
      
 
                Ireland3776 Posts
 | 
                    
                      |  Posted - 23 January 2009 :  09:24:17     
 |  
                      | Mike, I should be able to interpret what the php version is doing. If you email it to me I'll have a look at it and see if it can be implemented with this mod. If its just a form along with some kind of notification to botscout then it should be possible. 
 There seems to be a wide variety of the Microsoft.XMLHTTP component (I think there are 6 versions) and they don't all support the same properties and methods.
 
 Can you post the inc_func_spam.asp that worked for you in scrollcode tags and also let me know which platform you are hosted on ? i.e. w2000 w2k3, W2k8, win98, NT, etc.
 
 I doubt the code will work on Sun One asp just in case anyone is thinking of installing it on there.<
 |  
                      | Podge.
 
 The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)
 
 My Mods: CAPTCHA Mod | GateKeeper Mod
 Tutorial: Enable subscriptions on your board
 
 Warning: The post above or below may contain nuts.
 |  
                      | Edited by - Podge on 23 January 2009  09:25:13
 |  
                      |  |  | 
              
                | AnonJrModerator
 
      
 
                United States5768 Posts
 | 
                    
                      |  Posted - 23 January 2009 :  09:59:18       
 |  
                      | quote:Last I checked, Sun One didn't support any of the XMLHTTP objects. Pitty...<Originally posted by Podge
 
 I doubt the code will work on Sun One asp just in case anyone is thinking of installing it on there.
 
 |  
                      |  |  | 
              
                | PodgeSupport Moderator
 
      
 
                Ireland3776 Posts
 |  | 
              
                | MrMike2000Starting Member
 
 
 
                16 Posts | 
                    
                      |  Posted - 28 January 2009 :  20:10:59       
 |  
                      | Podge, 
 Is there a completed (or partially completed) code package for Snitz that I can link to, and/or put on the BotScout site?
 
 <
 |  
                      |  |  | 
              
                | PodgeSupport Moderator
 
      
 
                Ireland3776 Posts
 |  | 
              
                | PodgeSupport Moderator
 
      
 
                Ireland3776 Posts
 |  | 
              
                | MrMike2000Starting Member
 
 
 
                16 Posts | 
                    
                      |  Posted - 29 January 2009 :  14:07:47       
 |  
                      | Super. I've stored a local copy and also linked to the Google Code cache. Thank you!< |  
                      |  |  | 
              
                | MrMike2000Starting Member
 
 
 
                16 Posts |  | 
              
                | HuwRForum Admin
 
      
 
                United Kingdom20611 Posts
 | 
                    
                      |  Posted - 20 February 2009 :  08:53:28       
 |  
                      | In general if you are scripting on the client and assuming you do not know which version of IE and which version of MSXML your visitors
 have installed then you are better off using version independent program
 ids as that way if an MSXML version is around that is bound to that
 program id you can instantiate it without needing to know about the
 exact MSXML version.
 
 The version independent program id for an XML HTTP request object is
 Microsoft.XMLHTTP
 thus
 var httpRequest = new ActiveXObject('Microsoft.XMLHTTP');
 creates an XML HTTP request object in IE 5 or later<
 |  
                      |  |  | 
              
                | PodgeSupport Moderator
 
      
 
                Ireland3776 Posts
 |  | 
              
                | cafcportalStarting Member
 
 
 
                United Kingdom4 Posts
 | 
                    
                      |  Posted - 13 May 2009 :  12:31:11       
 |  
                      | Hi, 
 After putting this code into my site and sorting a couple of syntax errors in the code I am getting the following error when attempting to register, (I used a known bot e-mail address)
 
 Microsoft VBScript runtime  error '800a000d'
 
 Type mismatch: 'cLng'
 
 /forum/inc_botscout.asp, line 34
 
 Line 34 is:
 
 botCheck = CLng(ipResponse) + CLng(usernameResponse) + CLng(emailResponse)
 
 What is the problem?
 
 I am NOT an ASP programmer, so please do not flame me if it is obvious to you ;-)
 
 
 |  
                      |  |  | 
              
                | AnonJrModerator
 
      
 
                United States5768 Posts
 | 
                    
                      |  Posted - 13 May 2009 :  12:58:35       
 |  
                      | off-the-cuff I'd say that one of the three variables you're trying to convert to a Long data type has a value that can't be converted. Beyond that I couldn't say as I'm not overly familiar with the code in question. |  
                      |  |  | 
              
                | cafcportalStarting Member
 
 
 
                United Kingdom4 Posts
 | 
                    
                      |  Posted - 13 May 2009 :  13:16:26       
 |  
                      | Ok - I fixed it. 
 The problem was that the Array 7 also had extra characters in. I changed it. My code is now as follows:
 
 inc_botscout.asp
 
 
  Set xml = Server.CreateObject("Microsoft.XMLHTTP")
  Set xmlDoc = Server.CreateObject("Microsoft.XMLHTTP")
 'Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
    xml.Open "GET", "http://botscout.com/test/?multi&name=" & Username & "&mail=" & emailAddress & "&ip=" & ipAddress & "&key=" & strBotScoutAPIKey, False
    xml.Send
    
    responseArray = Split(xml.responseText, "|")
        
    ipResponse = responseArray(3)
    usernameResponse = responseArray(5)  
    emailResponse = left(responseArray(7),1)
    
    botCheck = CLng(ipResponse) + CLng(usernameResponse) + CLng(emailResponse)
  Set xml = Nothing
end function
 my code in register.asp now looks like:
 
 	
DIM spamScore
    spamScore = botCheck(Request.Servervariables("REMOTE_HOST"), Request.Form("Email"), Request.Form("Name"))
	if spamScore  > 3 then
		Response.Write ("BotCheck: you have a spam score of:" & spamScore) ' Tell the user what the problem is
		Response.End ' Stop processing
	end if
 This stops spammers from registering (I hope)
 
 Maybe I can program in ASP after all? ;-)
 
 
 |  
                      | Edited by - cafcportal on 13 May 2009  13:17:28
 |  
                      |  |  | 
              
                | AnonJrModerator
 
      
 
                United States5768 Posts
 | 
                    
                      |  Posted - 13 May 2009 :  13:42:23       
 |  
                      | Glad you got it fixed. 
 Just do us a small favor and use the not-quite-documented [scrollcode] tags Huw put in these forums to keep the code from stretching the layout.
  |  
                      |  |  | 
              
                
                |  Topic  |  |