i want to know the specific code used to open a webpage. i was bored and decided to make a lil dos program that takes input for url and stuff and opens the page.
any help would be great. thanks
i want to know the specific code used to open a webpage. i was bored and decided to make a lil dos program that takes input for url and stuff and opens the page.
any help would be great. thanks
Google ShellExecute, or search these forums for that
Mmm, you mean 'dos' as in a win32 console, like what you get with modern 32-bit compilers?
Or do you mean 'dos', as in some ancient 16-bit fossil with Turbo-C ?
Check out the networking forum (where this thread now lives).
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
i got it using that shellexecute function (i googled it ^^)
thanks
how do you make the page open in a specific browser
say i have firefox set as my default browser but i want this specific page to open in internet explorer
how do i make it do this
I'd download the "IE Tab" extension for firefox if I wanted to load specific pages in an "IE browser".
Most browsers accept some kind of command line parameters, say
iexplore "http://www.google.com"
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
so what your saying is in:
it should look like:Code:ShellExecute( NULL, "open", URL, NULL, "C:\\", SW_SHOW );
???Code:ShellExecute( NULL, "open", URL, NULL, "C:\\", SW_SHOW, iexplorer.exe );
heres the program:
wait, should the c:// be the file path to the specific browser?Code://Dan Kemper ([email protected]) //webpage opening program #include <conio.h> #include <iostream> #include <windows.h> using namespace std; int main() { char *URL="www.google.com"; char input[100]; cout << "Enter the url for the website you want opened." << endl << endl; cout << "URL: "; cin.get(input,100); cin.ignore(80,'\n'); URL=input; ShellExecute( NULL, "open", URL, NULL, "C:\\", SW_SHOW ); return 0; }
the program runs perfect as is, i just want it to open in internet explorer
Last edited by ReLiEnThAwK; 08-15-2006 at 01:46 PM.
i cant find anywhere that tells me what these parameters do or control
i finally figured it out.
this is what it needs to look like:
Code:ShellExecute( NULL, "open", "iexplore.exe", URL, "C:\\", SW_SHOW );