» Site Navigation | | | » Advertisement | | | » Recent Threads | | | | | | | Paypal help? Today 10:11 PM  Last post by 1x1 Today 10:11 PM 0 Replies, 4 Views | | | |  |  | Rockage's Neopets Login [VB6] |  |
04-27-2007, 10:34 PM
|
#1 (permalink)
| Banned
Join Date: Feb 2007 Posts: 87
GPoints: 24 Rep Power: 0 | Rockage's Neopets Login [VB6] this is very simple here :P for the programmer newbies. PHP Code: Private Sub Command1_Click() strhtml = wrapper.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtuser & "&password=" & txtpass & "&destination=%2Fpetcentral.phtml", "http://www.neopets.com/hi.phtml") If InStr(strhtml, "badpassword.phtml") Then MsgBox "Bad Password" ElseIf InStr(strhtml, "petcentral.phtml") Then MsgBox "Login Was Successful" ElseIf InStr(strhtml, "FROZEN") Then MsgBox "That account was frozen, Sorry" End If End Sub
Need any help feel free to ask  | |
| |  | |  |
04-28-2007, 10:28 AM
|
#2 (permalink)
| Banned
Join Date: Apr 2007 Posts: 95
GPoints: 5 Rep Power: 0 | Sam...
You should know this (because you accuse me of ripping everything)
You have to name strings, and also use txtUser.text and txtPass.text...
Also use Instr(1, strhtml, "petcentral.phtml", vbtextcompare)
The 1 at the beginning tells VB6 to search from the start of strhtml.
vbtextcompare makes it so that it won't be CaSe SeNsItIvE Code: Private Sub Command1_Click()
Dim strhtml as String
strhtml = wrapper.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtuser.text & "&password=" & txtpass.text & "&destination=%2Fpetcentral.phtml", "http://www.neopets.com/hi.phtml")
If InStr(1, strhtml, "badpassword.phtml", vbtextcompare) Then
MsgBox "Bad Password"
ElseIf InStr(1, strhtml, "petcentral.phtml", vbtextcompare) Then
MsgBox "Login Was Successful"
ElseIf InStr(1, strhtml, "FROZEN", vbtextcompare) Then
MsgBox "That account was frozen, Sorry"
End If
End Sub Let me know what you think. | |
| |  |
04-28-2007, 10:30 AM
|
#3 (permalink)
| Banned
Join Date: Feb 2007 Posts: 87
GPoints: 24 Rep Power: 0 | It doesnt have to be case sensitive. Stop trying to act smart by out smarting me. You havent. You just made my simple login a little more complicated.
Also, I named strings at the start of the project kthkzbai. | |
| |
04-28-2007, 10:32 AM
|
#4 (permalink)
| Banned
Join Date: Apr 2007 Posts: 95
GPoints: 5 Rep Power: 0 | Ok. Sorry for trying to help...
But using InStr(1, strhtml, "FROZEN") is better than using
InStr(1, strhtml, "FROZEN")
Because then it searches from the first character to the last. | |
| |
04-28-2007, 10:51 AM
|
#5 (permalink)
| | | Quote:
Originally Posted by Zachafer Ok. Sorry for trying to help...
But using InStr(1, strhtml, "FROZEN") is better than using
InStr(1, strhtml, "FROZEN")
Because then it searches from the first character to the last. | Technically if you're only using InStr to check whether or not the substring is in the string it would be faster to use InStrB as it's significantly faster. | |
| |  | |  |
04-28-2007, 01:11 PM
|
#6 (permalink)
| Æthean
Join Date: Nov 2006 Location: Ontario Age: 18 Posts: 1,294
GPoints: 580 Rep Power: 9 | Quote:
Originally Posted by Zachafer Sam...
You should know this (because you accuse me of ripping everything)
You have to name strings, and also use txtUser.text and txtPass.text...
Also use Instr(1, strhtml, "petcentral.phtml", vbtextcompare)
The 1 at the beginning tells VB6 to search from the start of strhtml.
vbtextcompare makes it so that it won't be CaSe SeNsItIvE Code: Private Sub Command1_Click()
Dim strhtml as String
strhtml = wrapper.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtuser.text & "&password=" & txtpass.text & "&destination=%2Fpetcentral.phtml", "http://www.neopets.com/hi.phtml")
If InStr(1, strhtml, "badpassword.phtml", vbtextcompare) Then
MsgBox "Bad Password"
ElseIf InStr(1, strhtml, "petcentral.phtml", vbtextcompare) Then
MsgBox "Login Was Successful"
ElseIf InStr(1, strhtml, "FROZEN", vbtextcompare) Then
MsgBox "That account was frozen, Sorry"
End If
End Sub Let me know what you think. | But.. you even admitted you ripped things at another site xD
Last edited by Aethean; 04-28-2007 at 01:16 PM.
| |
| |  |  | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |