By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,503 Members | 1,628 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,503 IT Pros & Developers. It's quick & easy.

Run URL in command prompt

P: 23
Hi All,

I have used system("firefox "url" "); to open a url in command prompt.
Is there any other way in c++ , that without runing firefox.exe , i will direct open the url in command prompt. please if someone know this reply me.


Thanks
Nov 11 '08 #1
Share this Question
Share on Google+
3 Replies


100+
P: 687
I have used system("firefox "url" "); to open a url in command prompt.
So that is how you make firefox run and tell it to load web page at address specified by url. ( i.e. send request, receive html and outher stuff like images and render it )

Is there any other way in c++ , that without runing firefox.exe , i will direct open the url in command prompt. please if someone know this reply me.
What do you want to do here? Tell some other browser to load the page or to load and render it in your program?
Nov 11 '08 #2

100+
P: 424
You can use the telnet utility in windows to open a url. For example, in command prompt, type

telnet www.yahoo.com 80

Then type:

GET /index.html HTTP/1.0

and the webserver will respond with the homepage of yahoo. Or you can open a url in the default browser by typing

start http://www.yahoo.com

on the command line...
Nov 11 '08 #3

100+
P: 256
you could also code your program to open a port and access the URL itself - sort of like implementing your own browser
Nov 11 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.