Solved

Download counter???

Posted on 2003-11-27
8
247 Views
Last Modified: 2010-04-15
(This is not a homework assignment although i am taking a C class right now)

I want to do stuff i havn't learned yet and i can't find my answers in the text book. I don't know what terms to look up in the index.

1. First how do i write a C program that takes command line parameters (i.e. format c:) the "c:" part being what i call a parameter. what is it really called?

2. Could i use some of this C programming that i am using for something that would actually be useful to me instead of some assignment where i convert temperatures. I want to make a small program that can be put on one of those free space servers (like geocites) and will run when someone downloads something, but it keeps track of how many times it downloads.

example:
<a href="myprogram.exe fileToDownload">click here to download</a>

end

where each time "myprogram.exe" is run it outputs a 1 to a file or gets the number in the file and adds 1 to it.

i can do that last part already just need to know if the rest is possible?


0
Comment
Question by:Paul S
  • 4
  • 4
8 Comments
 
LVL 11

Author Comment

by:Paul S
ID: 9835491
i created a webpage to help with a few computer problems i have had. i posted messages saying i fixed my problem email me for help. i then got lots of messages so i created a page to do the work i was doing by email. i want to right the program i mentioned to see if anyone is downloading the files i put out to help.

site = "http://www.geocities.com/pspagnola/computer.html"
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 25 total points
ID: 9835503
>. First how do i write a C program that takes command line parameters (i.e. format c:) the "c:" part being what i call a >arameter. what is it really called?
command line arguments ... look into argc and argv .... argc is number of commandline arguments while argv is a char * array which actually holds the command line arguments ... they are accessed in your C program as
int main ( int argc, char * argv[] )

>2. Could i use some of this C programming that i am using for something that would actually be useful to me instead of some >assignment where i convert temperatures. I want to make a small program that can be put on one of those free space >servers (like geocites) and will run when someone downloads something, but it keeps track of how many times it downloads.
You can use C to build a lot of useful things but I am afraid that C is not the best language to build web related tools...
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9835520
geocities anyway gives you stats for which page was access how many times... I am not sure if geocities would allow you to run your programs at their servers
0
 
LVL 11

Author Comment

by:Paul S
ID: 9835572
which language is the best for web related tools?
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 45

Expert Comment

by:sunnycoder
ID: 9835697
>which language is the best for web related tools?
I think you can get a better answer in the web development topic area... I have no experience with web programming
As a generic rule, the choice of language depends on the functionality desired and the application.
0
 
LVL 11

Author Comment

by:Paul S
ID: 9839967
is it possible to create a windows xp restore point using C code? can it be done using the system command code like from a command prompt? i'm no sure how to create a restore point except throught the start menu.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9841495
sorry ... not much idea about window$
0
 
LVL 11

Author Comment

by:Paul S
ID: 9844173
thanks anyways.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
logging Access violation 6 18
memory mapped I/O query 6 142
Is string constant address ? 10 192
Using ANSI C how to Read a .csv file 10 72
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now