LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Socket Programming to Open/Go To Web Sites (https://www.linuxquestions.org/questions/programming-9/socket-programming-to-open-go-to-web-sites-845789/)

ShishioMakoto 11-22-2010 07:15 AM

Socket Programming to Open/Go To Web Sites
 
Hello everyone! Does anyone here know how to implement socket programming in C programming language to go to web sites? My desired program should look like this: the program asks for an integer input from the user and depending on the input number, the program invokes and tries to connect to a specific website. For example, if the input is 1, the program will try to connect to htttp://www.yahoo.com and if the input is 2, the program will try to connect to http://www.google.com. The websites will be pre-determined, meaning if the input is 1, the program will go to www.yahoo.com only, the program shouldn't try to connect to random websites. By the way, I'm using Linux as my operating system. Any concepts/strategies/links to tutorials/sample codes will be greatly appreciated. Thank you.

JohnGraham 11-22-2010 07:21 AM

For network programming in general, try this tutorial. If you're wanting to use the HTTP protocol as opposed to doing all the work yourself, see libcurl.


All times are GMT -5. The time now is 09:24 AM.