That's my objective in the title.. p.s. does anyone know how to make text inputs opaque? p.p.s does anyone know how to retrieve BBPost addresses to send a post to multiple Boards/Rooms?

Recommended Answers

All 20 Replies

This would be very appreciated.. but all that I need is how to make a project that is the equivalent of an internet posting form... so when they click the button, it sends the form to become a BBChat post

I'm not very clear about what you are trying to do here.... elaborate clearly please.

I'm making a project.. and it is a typical looking BBPost Window... then you click the button and it sends to a selected location.... but I don't know how to do that with the button..

we are talking about submitting data to a bbpost (web page?) with a visual basic app?

outstanding.... I would suggest using the microsoft internet control. You can then generate in your vb app the URL, and pass the url to the internet control. This control effectively allows you to build "your own browser." using the internet explorer's browser.... if that makes any sense. It's more like, IE with your own wrapper, but.... you can always set it's visibility to false, and then navigate to the site.

The alternative is nasty.... a mixture of winsock and the http protocol :( , Let me know if you need some additional assitance.

I would suggest using the microsoft internet control. You can then generate in your vb app the URL, and pass the url to the internet control.

[br]Ummm... how do I use that control and what script needs to be applied for a sucseesful URL transfer?

Oh Goodness,

I don't use it any more, but, you have to figure out if bbchat uses POST or GET, and that will change the way you have to go about doing this.... but the internet transfer control, basically just loads a web page. So, if the url, when you post a bbchat is something like this:

or whatever the case may be.... then you'll need to construct such an URL in your source code, and then make the internet control navigate to that

url = ""
browser1.navigate url

then you could use the events that fire (such as on complete, or whatever), and you'll know your post is complete. If BBChat uses a different method, then you may have to write your own HTML Page from within VB... and then navigate to it. If you link me to BBChat (so I can examine how it works) then I'd be glad to assist you further.

1)and so, will that snippet be sucsessful in both GET and POST functions? Bcause I've looked at the source-- in the PHP HTML (PHTML) it uses the post method in the form... so thats that
2) Is there a way I can use this function without opening the page the data is being sent to?

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?

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....

Yea.. I feel stupid now.. your patience is making this easier though

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?

ummm.. no.. I dont.... For now all I really need is the code to make it submit...

<FORM method="post" action="">
<Input type="hidden" name="return user">
<input type="text" name="subject">
<textarea name="body" style="height:200; width:300"></textarea>
<input type="submit" value="Post" name="frmsub">

You see the HTML there... Now how does that translate into VBCode? (My first programming exp.)

lol need some coffee?

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 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....


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

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.

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?

That's certainly going to complicate matters significantly. The only way to see if the PHP page is checking for IP's or Referer, is to actually write a program that sends the data to the server with the cloaked referer. You could do this with telnet, if you know the HTTP Header Information. If it accepts it with the altered referer, then it does NOT use the IP address. But when you through the GET and the MD5 Hash into play, it complicates matters. Now the PHP page is wanting the URL to contain the md5 hash, which is going to be a bit of a pain to pass in the header.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.