| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Sep 12, 2007 10:37 pm Post subject: extracting data from the web |
|
|
In me and my friends program, we open a link in an invisible browser(it would be in teh way if you could see it) and we want to extract some text from it. How do we do this, btw its in vb(my friend is skate4lifee so yeah) _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Sep 13, 2007 12:50 am Post subject: Re: extracting data from the web |
|
|
| oib111 wrote: | | In me and my friends program, we open a link in an invisible browser(it would be in teh way if you could see it) and we want to extract some text from it. How do we do this, btw its in vb(my friend is skate4lifee so yeah) |
How are you connecting to the net to pull the data within VB? |
|
| Back to top |
|
 |
zart Master Cheater
Reputation: 0
Joined: 20 Aug 2007 Posts: 351 Location: russia
|
Posted: Thu Sep 13, 2007 6:13 am Post subject: |
|
|
Depends how you are loading it, but you should be able to pipe the data into some type of form that you can parse. extracting data shouldn't be a problem if you know what to expect - html is easy to find since it's always in between "< >"'s
Then again if your just using a ocx file - you might have to do research on that specific file. _________________
0x7A 0x61 0x72 0x74
TEAM RESURRECTiON |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Sep 13, 2007 9:24 am Post subject: |
|
|
Here is the basic layout of the program , its a thing for people weho use rapidshare and dont have premium accounts so tehy have to wait, our program tells them how much longer they have to wait, and notifies them when its over. When they click the start button it will open up a browser with an alphablend at 0 so you cant see and go to their link. then we want to take the number of minutes(i.e please wait 160 minutes until next download). _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Thu Sep 13, 2007 9:26 am Post subject: |
|
|
| There's no point in graphically rendering the html if you aren't going to show it to the user. But since you're using VB (which can't do anything good) you can't just dowload the page and parse it. |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Sep 13, 2007 9:28 am Post subject: |
|
|
We are going to show it to the user =P. There are three labels(hours, minutes and seconds) which will display the time left...and if he can't do in vb, how can I do it in C++? _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Sep 13, 2007 9:31 am Post subject: |
|
|
HttpAddRequestHeaders
HttpEndRequest
HttpOpenRequest
HttpQueryInfo
HttpSendRequest
HttpSendRequestEx
All of those? _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Thu Sep 13, 2007 9:32 am Post subject: |
|
|
| yes |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Sep 13, 2007 9:36 am Post subject: |
|
|
ok _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Sep 13, 2007 3:53 pm Post subject: |
|
|
| appalsap wrote: | | There's no point in graphically rendering the html if you aren't going to show it to the user. But since you're using VB (which can't do anything good) you can't just dowload the page and parse it. |
Umm yeah you can... and VB can do a lot. It has its limits, but it has a purpose as well.
| oib111 wrote: | | We are going to show it to the user =P. There are three labels(hours, minutes and seconds) which will display the time left...and if he can't do in vb, how can I do it in C++? |
You can do it in VB, you can do it more then one way as well. I suggest looking into Winsock to learn how to make a connection. I also suggest that you do not use the ocx version of it but instead look for the API module for it.
A very nice site for VB6 to do winsock stuff is: http://www.winsockvb.com/
Edit::
Ok so because of the stories I've heard about Applesap, heres an example of extracting data from the web using VB6, source included as well as a compiled exe if you don't have a VB6 compiler. Just so you can't fight with me cause I don't have time to fight with you.
This examples basic and does not need to parse the HTML because the site it uses does not contain anything on the page except the IP address of the connected user. I'll write a more complex one for you though.
Last edited by atom0s on Thu Sep 13, 2007 4:42 pm; edited 1 time in total |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Sep 13, 2007 4:41 pm Post subject: |
|
|
But isn't calling API's in vb rly hard?  _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Thu Sep 13, 2007 4:43 pm Post subject: |
|
|
well then you better code it in something else
like c++ _________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Sep 13, 2007 4:43 pm Post subject: |
|
|
| oib111 wrote: | But isn't calling API's in vb rly hard?  |
No. I will make an example using sockets for you via API, give me a few min. Also if you downloaded that example redownload it Winrar didn't zip the right stuff so that form wont work.
Edit:: Ok can't write the code cause I gotta go out got busy with other stuff and yea.. wont be home probably all night now. I suggest going over to:
http://pscode.com/
And look at some winsock examples there. Theres tons of things you can find on that site that will give you a heads up on things for VB6. Search for Winsock API to learn how to use Winsock without needing the OCX file. |
|
| Back to top |
|
 |
|