Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
If I could get some advice from the code gurus..
Topic Started: Oct 26 2009, 09:19 PM (195 Views)
ZapTap
Want to talk? My inbox is always open :D
[ *  *  *  * ]
I was asked to make a program, preferably in vb .net 2003, that allows the user to input a search term (the example I was given was all stone shops in a certain area, via the Yellow Pages website) and the program will show the contact info and details for each of the results, which would be considered potential clients

What I need is how to call on the data from the webpage so I can obtain the information
Edited by ZapTap, Oct 26 2009, 09:21 PM.
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar


Is there any good reason for wanting to use VB.net? Because I doubt you'll get much help with it here, or anywhere. (Other then maybe some MS fanboy forum.)
Offline Profile Quote Post Goto Top
 
ZapTap
Want to talk? My inbox is always open :D
[ *  *  *  * ]
The good reasons being that:

I'm 15 years old and have no plans to learn another language for one fairly simple program
I have to know it for a class in school




I do plan on learning C++ and C# etc. later on, but I can't hardly crack open a book about it without my dad getting upset, so they'll have to wait
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar


I gues thats a goodish reason. :P

I don't know much VB, but for getting the page this looks decent: http://www.joel.net/code/easyhttp.aspx
After that, all you need to do is parse some XML. This example looks usefull: http://www.example-code.com/vbdotnet/xmlSearch.asp
Offline Profile Quote Post Goto Top
 
ZapTap
Want to talk? My inbox is always open :D
[ *  *  *  * ]
haha don't worry, I'll get there, probably next semester when I know a good bit of VB (and by a good bit, I don't just mean more than my teacher <_< )


huh, does anyone know how I can retrieve the list of categories from the yellow pages website? (the .com one)
Edited by ZapTap, Oct 28 2009, 09:53 PM.
Offline Profile Quote Post Goto Top
 
Reid.
C'est un piège!
[ *  *  * ]
Do you have a basic knowledge of IP workings? If not, that might be useful to learn.. I can't really direct you to anywhere to learn that though.
Offline Profile Quote Post Goto Top
 
ZapTap
Want to talk? My inbox is always open :D
[ *  *  *  * ]
hmm.. IP workings as in what the numbers mean, or as in what they do?

I do remember that they are the addresses of the computers attached to the internet from web design stuff a while ago
Offline Profile Quote Post Goto Top
 
Reid.
C'est un piège!
[ *  *  * ]
ZapTap
Oct 29 2009, 08:00 PM
hmm.. IP workings as in what the numbers mean, or as in what they do?

I do remember that they are the addresses of the computers attached to the internet from web design stuff a while ago
IP as in Internet Protocol. HTTP, for example, stands for Hyper Text Transfer Protocol. HTML is Hyper Text Markup Language.. and so on. FTP is File Transfer Protocol (if memory serves) and so on and so forth.

What I was really trying to get at was GET and POST requests, which will be necessary to search the yellow pages. You'll have to determine how the data is sent. Most public data, like stuff you'd bookmark, is sent through GET; by the same token, most private data (like usernames and passwords) is sent via the POST method. Also, lengthy types of fields usually are sent through POST because there is a smaller limit on the data you can send via GET.

The $.get and $.post methods in jQuery are (somewhat) similar to the basic idea. $.get is usually used for requesting pages in most of the work done on ZB, but is also used for the GET method. $.post is (99% of the time) used as submission.

The difference between GET and POST is the URL. For example, if you quote this post and look at the url, you'll see a bunch of data at the end. mode=2, type=2, f=42.. etc. That's the GET method. The POST method isn't sent through the URL like that, which is why it's used for private data.

At any rate, I believe everything in this post is accurate, but I could be wrong on some of it. Networking is one of my weaknesses in the computer science field, and the TCP/IP system is fairly immense so it's easy to get lost among the details and mix some of it up. That being said, if I got anything wrong, feel free to correct me. :P
Offline Profile Quote Post Goto Top
 
ZapTap
Want to talk? My inbox is always open :D
[ *  *  *  * ]
Ahh so basic PHP requests you mean (I assume so, since you mentioned the PHP variables at the end of the URL)? I'll have to learn some php then...

oh, and you're right, FTP is File Transfer Protocol ;)



EDIT

and after that, how would I take the phone number or address from the webpage after I've called on that page?

I'd assume the best way is to call the search page, and copy the links from it into an array, than use the values in the array to view the contact info pages and get the information? or is there a better way?
Edited by ZapTap, Oct 30 2009, 09:02 PM.
Offline Profile Quote Post Goto Top
 
dZ
Member
[ *  * ]
PHP would work best for this, especially calling variables. (It's ironic, considering I just posted my madlib topic, which does just that. =p)
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar


You don't need to know how a request is handled to make one. EasyHttp (see link in my previous post) takes a domain name as input and gives you the response as a string. No need to understand how that request is handled. (And as you can see, the EasyHttp class doesn't have any knowledge of that either. Its handled by the operating system.)

ZapTab, I'm not sure how their search system works, but yes, that seems a senible approach.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Programming and Scripting Chat · Next Topic »
Add Reply