User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 391,733 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,278 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 9036 | Replies: 20
Reply
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: VB6 submit button sends information to BBChat

  #11  
Feb 21st, 2005
No No, That little minor snippit is only an example, and nothing else. Since the form method is POST, It's not going to change the URL any.... so, to my knowledge, changing the URL isn't going to do any good. What you will need to do, is make you VB app, pretty much duplicate the PHTML page that SUBMITS the data to the server side.... An Example, is that I can make a page, that looks absolutely nothing like ... say, yahoo's mail page, but if I make my own page, and I make the same names (the same names that yahoo uses for the names of their username and password boxes) the same in mine... and I make my page's <FORM ACTION go to the same place as yahoo's.... I should be able to log in to yahoo with my own login page, right?

Well, if you make your own HTML Page or PHTML Page, that does the same thing as the bbchat page, then it should accept all the data you send to it.... effectively "duplicating" the effects of the original page. You use the internet control (it's a webbrowser control) to navigate to the page that your vb program made to duplicate the bbchat.... with me so far?
Reply With Quote  
Join Date: Feb 2005
Posts: 15
Reputation: smoked_apart is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
smoked_apart's Avatar
smoked_apart smoked_apart is offline Offline
Newbie Poster

Re: VB6 submit button sends information to BBChat

  #12  
Feb 21st, 2005
Okay.. so what now? lol sorry this is my first programming expierence ever.. atleast this isn't like C where you have to specify physical size and crap...... I'm just a web-designer... I know HTML and stuff....
Reply With Quote  
Join Date: Feb 2005
Posts: 15
Reputation: smoked_apart is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
smoked_apart's Avatar
smoked_apart smoked_apart is offline Offline
Newbie Poster

Help Re: VB6 submit button sends information to BBChat

  #13  
Feb 21st, 2005
Yea.. I feel stupid now.. your patience is making this easier though
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: VB6 submit button sends information to BBChat

  #14  
Feb 22nd, 2005
Well, I would code this for you, but I don' t have any knowledge about BBChat at all... but as a web designer, you know that you can make 100 different pages that all call the same server side app (cgi, asp, etc). I can have 10 different pages, that all log me in to the same mail system, or 10 different pages that log me into a news post. I could use a different page for each day of the week. Friday's Logo could be a black page, with TGIF at the top.... Monday's could be white with WHY ME!?, and they are 2 completely different HTML pages....but they both do the exact same thing (log into a mail system). The same is true for bbchat. You can make your own HTML Page, that will let you post to bbchat.... it says "This Is My BBChat Page" instead of the standard junk that comes with bbchat (assuming it's so). Well, you could make your VB program actually write this page locally.... and then make your vb program, through code "surf" to this new page.... and submit it. This would submit the page to BBChat, and effectively post. You don't have a link to this bbchat do you?
Reply With Quote  
Join Date: Feb 2005
Posts: 15
Reputation: smoked_apart is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
smoked_apart's Avatar
smoked_apart smoked_apart is offline Offline
Newbie Poster

Help Re: VB6 submit button sends information to BBChat

  #15  
Feb 22nd, 2005
ummm.. no.. I dont.... For now all I really need is the code to make it submit...
<FORM method="post" action="http://www.someserver.com/chat.phtml?boardID=345334556009">
<Input type="hidden" name="return user">
<input type="text" name="subject">
   <br>
<textarea name="body" style="height:200; width:300"></textarea>
   <p>
<input type="submit" value="Post" name="frmsub">

You see the HTML there... Now how does that translate into VBCode? (My first programming exp.)
Reply With Quote  
Join Date: Feb 2005
Posts: 15
Reputation: smoked_apart is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
smoked_apart's Avatar
smoked_apart smoked_apart is offline Offline
Newbie Poster

Re: VB6 submit button sends information to BBChat

  #16  
Feb 22nd, 2005
lol need some coffee?
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: VB6 submit button sends information to BBChat

  #17  
Feb 22nd, 2005
Nah, I've got some example almost done... 3 projects.

Alright, I've got 3 VB Projects In that zip file. You should look at them in the order of: browser, example, cool.

Basically, the first one is just a browser with no navigation buttons or anything... it just loads up and goes to http://www.daniweb.com. Plain and simple. Goal: understand that VB Apps can have built in web-browsers.

Example, On the other hand, on form load launches an inputbox to get a string from the user. It stores it in a variable. It then makes a variable (called html) that stores a custom google page. (my own personal favorite). It has nothing but a form, a textbox, and a button. Plain and simple. The thing about this one, is that you see in the vb code, that whatever the person types in the inputbox, gets put into the textbox on the web page (by adding it in the HTML before it's written to the file).
Goal: understand that we can write our HTML file, with information from the user, and have that page load up. (you still have to click the submit button on the page for this one)

Cool, now, is the final project. It is basically Example, only it adds some javascript to the page that we write, AFTER the closing FORM Tag, but before the closing HTML Tag. The HTML That We Add, actually submits the page, using javascript with the forms .submit method. So, Essentially, we have a self-submitting web-page, with whatever we want in the form, in the form. Then, our VB app navigates to this self-submitting, pre-filled out web page, which forces it to submit to the server.
Goal: understand that we can make a self-submitting, pre-filled out web page, and have it submitted to the server to yield our specified result.

Understand, however, that this is only being done for google, as a search. So, it's fairly pointless, with the exception of the understanding of the concepts that go along with what we are doing. The Program Runs, Asks the user for something to search at google.... writes a self-submitting, pre-filled out web page to the hard drive, navigates to it.... and display's the result. When the BBChat program is completed.... You wouldn't want to leave the browser control visible. You'd hide someone on the form beyond the edges, and set it's visibility to false.... and then just use your own information from the VB app... well, you know what I mean. I hope this has helped a little bit.... I'm more than happy and willing to help you work on this for your bbchat... but it is important to me that you understand what is going on, so that for future use, in case you need the concept again, you know it. Let me know what you think thus far....
Attached Files
File Type: zip Steps.zip (7.6 KB, 90 views)
Reply With Quote  
Join Date: Apr 2005
Posts: 2
Reputation: Cadaver is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Cadaver Cadaver is offline Offline
Newbie Poster

Re: VB6 submit button sends information to BBChat

  #18  
Apr 21st, 2005
comatose:

This is really helpful, and is almost working, except for one thing. It seems that the php script that is used in the website im using this for has one of those anti-come from another page type things.


i cant seem to do this because it has some check that sees if you're coming from their home page. Is there a way to redirect to the web page, fill out the forms that you wish, and make it click submit straight from their webpage? or is that a whole different project? :/

i cant seem how to figure it out

i know that inet control comes with a METHOD syntax that lets you tell a form to 'POST'. Would this be work?

Because what i'm trying to do is emulate exactly as if i were going on the site and manually typing the information in.

Thanks. :e
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: VB6 submit button sends information to BBChat

  #19  
Apr 23rd, 2005
There is a way to do it, but not with the project we have here. There are a couple of ways, however. A Nasty way is to use the "sendkeys" function to sendkeys to the web-browser. This way is tacky, and should not be used if it can be avoided. The best way is to use a socket control, that sends header information to the web site. I don't know if the CGI checks by referer, or by IP address, but if it checks by referer, then it's no problem to mock that referer. To Trick the page into thinking that it's recieving it's data from the page that it needs. What we need to know is if the page restricts by referer, or by IP address.
Reply With Quote  
Join Date: Apr 2005
Posts: 2
Reputation: Cadaver is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Cadaver Cadaver is offline Offline
Newbie Poster

Re: VB6 submit button sends information to BBChat

  #20  
Apr 23rd, 2005
so using the winsock control it could be done?

Could you give me any sort of example? Would i need a packet sniffer to see whats being sent to the website exactly? and just recreate that packet?

also, what if its restricting by referer AND ip, and how would i check?

its also using 'GET' rather than 'POST' i just realized on the form.
also, the site uses PHPSession=crazy-md5-hash-here. so would that cause a problem?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 3:50 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC