Regular PM code.
PM'er with Captcha:Code:Public Function SendMessage(ByVal strRecipient As String, _ ByVal strTitle As String, _ ByVal strMessage As String _ ) As Boolean Dim strHTML As String, _ strURL As String, _ strReferer As String, _ strPost As String strURL = "http://www.gaiaonline.com/profile/privmsg.php" strReferer = "http://www.gaiaonline.com/profile/privmsg.php?mode=post" strPost = "username=" & _ strRecipient & "&subject=" & _ URLEncode(strTitle) & "&message=" & _ URLEncode(strMessage) & "&area_code=&pn1=&pn2=&selected_options=post&btn_send=true&preview=&post=&mode=post&src=&folder=inbox&id=" SecondsToWait (3) strHTML = Form1.wrapper.PostWrapper(strURL, _ strPost, _ strReferer) If (InStr(1, strHTML, "Your Private Message has been sent to", vbTextCompare) <> 0) Then SendMessage = True Else SendMessage = False End If End Function
URL Encode:Code:Public Function Captcha(ByVal strUserName As String, _ ByVal strSubject As String, _ ByVal strMessage As String, _ ByVal strCaptcha As String _ ) As Boolean Dim strHTML As String, _ strURL As String, _ strReferer As String, _ strPost As String strCaptcha = Replace(strCaptcha, " ", "+") strURL = "http://www.gaiaonline.com/profile/privmsg.php" strReferer = "http://www.gaiaonline.com/profile/privmsg.php" strPost = "username=" & _ strUserName & "&subject=" & _ URLEncode(strSubject) & "&message=" & _ URLEncode(strMessage) & "&recaptcha_response_field=" & _ strCaptcha & "&placeholder=&preview=&post=&mode=post&src=&folder=inbox&id=&area_code=&pn1=&pn2=&recaptcha_challenge_field=" & _ strCapURL & "&selected_options=post&btn_send=true" strHTML = Form1.wrapper.PostWrapper(strURL, _ strPost, _ strReferer) If (InStr(1, strHTML, "Your Private Message has been sent to", vbTextCompare) <> 0) Then Captcha = True Else Captcha = False End If End Function
Code:Public Function URLEncode(ByVal Text As String) As String Dim i As Integer Dim acode As Integer Dim char As String URLEncode = Text For i = Len(URLEncode) To 1 Step -1 acode = Asc(Mid$(URLEncode, i, 1)) Select Case acode Case 48 To 57, 65 To 90, 97 To 122 ' don't touch alphanumeric chars Case 32 ' replace space with "+" Mid$(URLEncode, i, 1) = "+" Case Else ' replace punctuation chars with "%hex" URLEncode = Left$(URLEncode, i - 1) & "%" & Hex$(acode) & Mid$ _ (URLEncode, i + 1) End Select Next End Function
Results 1 to 30 of 30
Thread: [Code]Auto PM'er
Threaded View
- 28 Mar. 2010 06:23pm #1
[Gaia]Auto PM'er
Last edited by Blazer; 28 Mar. 2010 at 06:31pm.