Ok all you need is the http wrapper and the moudle These should be on your form text box called txtusername text box called txtpass httpwrapper call httpwrapper the wait and stuff modules a buton called cmdrefresh a lable call lblstatus a button called cmd refresh here is the code Code (Text): Public Function FindString(TextToSearch As String, StartText As String, EndText As String, Optional StartPos As Long = 1) Dim sText As Long, eText As Long sText = InStr(StartPos, TextToSearch, StartText, vbTextCompare) + Len(StartText) eText = InStr(sText, TextToSearch, EndText, vbTextCompare) If sText >= Len(StartText) And eText > sText Then FindString = Mid$(TextToSearch, sText, eText - sText) Else FindString = "" End If End Function dim strhtml as string private sub cmdlogin_click() strHTML = Httpwrapper.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtUsername.Text & "&password=" & txtPassword.Text & "&destination=%2Fpetcentral.phtml", "http://www.neopets.com/hi.phtml") 'Now to check if we logged in or not! 'Check for bad password. If InStr(1, strHTML, "badpassword") <> 0 Then MsgBox "You entered an invalid username/password combination!" & vbNewLine & "Please try again.", vbCritical, "Login Failure" 'Check if account is frozen. ElseIf InStr(1, strHTML, "This account has been") <> 0 Then MsgBox "ACCOUNT FROZEN!" & vbNewLine & "Please use another.", vbCritical, "Login Failure" 'Check if we tried to login to many times. ElseIf InStr(1, strHTML, "too many times") <> 0 Then MsgBox "You have tried to guess the password to many times in the last hour!" & vbNewLine & "Try again later.", vbCritical, "Login Failure" cmdrefersh.enable = true 'checks login strHTML = HttpWrapper.GetWrapper("http://neopets.com/petcentral.phtml") If InStr(1, strHTML, "Active Pet") <> 0 Then cmdrefresh.Enabled = False End If Private Sub cmdrefresh_() call refresh end sub Public Sub refresh() HttpWrapper.GetWrapper("http://neopets.com/winter/index.phtml") If InStr(1, strHTML, "Something has happened") <> 0 Then msgBox "You got a random event exit sub End if call refresh This is very basic and here is the exapmle of what to put afrter httpwrapper.getwrapper/postwrapper Code (Text): httpwrapper.getwrapper("place to sedn data to or go to", "data to send", "refer page aka page that will direct you to page in the fist place") This will only check for a random event but will not tell you what it is This is just a good intro to your http wrapper and you +rep if I helped If you master this pm me and I could help you make this ten times better
Very usefull... If i PM you, cand you add how to make an advert to this program? Its like when you download something from firefox, a little advert in bottom right =D Edit;; Maybe adding images? Edit 2;; You forgot the cmdlogin =D
This is wrong. The get and Post functions are completely different. You should use getwrapper when you want to load a page and check something in it, like a link or a name, while you should use postWrapper when you want to send data, such as a button click or a shop wizard search. In a refresher all you need to do is load a page and check for a "Something Has Happened!" String in it. Then you can also record the random event, but it wouldn't be a "easy" refresher anymore... Examples of the use of GetWrapper: Code (Text): Wrapper1.GetWrapper("http://www.***.com/index.phtml", _ 'this is the link we want to load "http://www.***.com/petcentral.phtml") 'this is the refer link The refer link is used most in the Postwrapper function, because sometimes a page won't load if the refer is not the right one. An example? The login itself. If you try deleting the refer (http://www.***.com/hi.phtml), the code won't log you in anymore. If someone doesn't understand anything of the above, then PM me