Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Almost all types of...
Today 12:09 AM
Last post by devl014
Today 10:33 PM
5 Replies, 45 Views
Go to first new post Heather wants to kill a...
Today 06:49 PM
Last post by Benita Mussolina
Today 10:29 PM
25 Replies, 109 Views
Go to first new post My formal on Friday
11-17-2008 05:12 AM
by Bex
Last post by Bex
Today 10:17 PM
11 Replies, 59 Views
Go to first new post Paypal help?
Today 10:11 PM
by 1x1
Last post by 1x1
Today 10:11 PM
0 Replies, 4 Views
Go to first new post NextGenWarrior = scammer
Yesterday 10:29 PM
by Peanuts
Last post by Jakious
Today 10:08 PM
13 Replies, 128 Views
Reply
 
LinkBack Thread Tools Display Modes

 Rockage's Neopets Login [VB6]
Old 04-27-2007, 10:34 PM   #1 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
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
  Reply With Quote

 
Old 04-28-2007, 10:28 AM   #2 (permalink)
Banned

Zachafer is offline
 
Join Date: Apr 2007
Posts: 95
GPoints: 5
iTrader: 0 / 0%
Zachafer Is gaining popularity
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.
  Reply With Quote

 
Old 04-28-2007, 10:30 AM   #3 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
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.
  Reply With Quote

 
Old 04-28-2007, 10:32 AM   #4 (permalink)
Banned

Zachafer is offline
 
Join Date: Apr 2007
Posts: 95
GPoints: 5
iTrader: 0 / 0%
Zachafer Is gaining popularity
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.
  Reply With Quote

 
Old 04-28-2007, 10:51 AM   #5 (permalink)
sockopen
Guest

 
Posts: n/a
GPoints: 0 [Check]
iTrader: / %
Rep Power:
Quote:
Originally Posted by Zachafer View Post
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.
  Reply With Quote

 
Old 04-28-2007, 01:11 PM   #6 (permalink)
Æthean

Male Aethean is online now
 
Aethean's Avatar
 
Join Date: Nov 2006
Location: Ontario
Age: 18
Posts: 1,294
GPoints: 580
iTrader: 0 / 0%
Aethean Is Popular
Rep Power: 9
Quote:
Originally Posted by Zachafer View Post
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.
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 10:36 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.13753700 seconds (100.00% PHP - 0% MySQL) with 19 queries