|
-
Mar 28th, 2003, 04:08 PM
#1
Thread Starter
Hyperactive Member
Command line application help
ok i dont know much about c but i am trying to make an aplication that will exec this url without opening IE or some other browser.
does anyone know how i can make this?
i would like to be able to have these arguments..
-h for hostname
-u for username
-p for password
could you either recomend a site to look at or help me? thanks!
-
Mar 29th, 2003, 05:10 AM
#2
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 29th, 2003, 10:25 AM
#3
Thread Starter
Hyperactive Member
execute thats what i mean by exec
-
Mar 29th, 2003, 11:18 AM
#4
Thread Starter
Hyperactive Member
this is what i have so far...
Code:
int main(int argc, char* argv[])
{
int ich;
while ((ich = (argc, argv, "abc"))) {
switch (ich) {
case 'a': /* Flags/Code when -a is specified */
printf("test a");
break;
case 'b': /* Flags/Code when -b is specified */
/* The argument passed in with b is specified */
/* by optarg */
printf("test b");
break;
case 'c': /* Flags/Code when -c is specified */
printf("test c");
break;
default: /* Code when there are no parameters */
printf("test none");
break;
}
}
return 1;
}
and when i do that no matter what i do it says test none repeating over and over... can anyone help me fix taht then i can work on the http stuff?
-
Mar 29th, 2003, 11:50 AM
#5
What do you mean by executing URLs? 
Code:
while ((ich = (argc, argv, "abc")))
No way, what should this line do?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 29th, 2003, 07:16 PM
#6
Thread Starter
Hyperactive Member
i dont know, im trying to figure out how to make an aplication that i can execute something like this "c:\folder\app -h host.dns.com -u username -p password" and it will update my dns.
-
Mar 30th, 2003, 12:47 PM
#7
But what do you mean by executing an URL?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 30th, 2003, 01:00 PM
#8
Thread Starter
Hyperactive Member
i need to be able to send a http request though tcp in my program, like you do in telnet with "GET HTTP/1.0" i need to be able to send that through the command line program im making.
-
Mar 30th, 2003, 01:32 PM
#9
Frenzied Member
Try Winsock Sockets. Do some research on MSDN
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Mar 30th, 2003, 01:54 PM
#10
Thread Starter
Hyperactive Member
im using borland...so do you have any sujestions for that?
-
Mar 30th, 2003, 02:47 PM
#11
Frenzied Member
google is always a good start if you need to find info.
here are some links
http://tangentsoft.net/wskfaq/
http://www.sockaddr.com/ExampleSourceCode.html
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Mar 30th, 2003, 03:13 PM
#12
Thread Starter
Hyperactive Member
thanks for the links, i have been using google. for the past few days...with no luck ill tell ya how it turns out.
-
Mar 31st, 2003, 10:06 AM
#13
Can't you simply write an input file for telnet?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 31st, 2003, 10:00 PM
#14
Thread Starter
Hyperactive Member
i could but im trying to write a program to do the same thing. i want to learn how things are done.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|