I'm a programmer-newbie, really a big one. I've just started reading thru all of the material, but the trick is I've started all of this just to make this program I need, and then an idea struck me, one that I could actually ask on a forum. So.
I need a program that enters a loop when I press start, and exits when I press stop. It does this: connects to internet using default settings (so I don't have to click connect each time), opens firefox, goes to a certain url which I specify and than disconnects. Waits 2 sec and then repeat. The trick is that I want it to function without my presence, and I don't want it to show any bubbles like 'now connected' and it doesn't need any confirmation when it starts the loop.
If someone knows how to do this (it think it's simple) please post the code or e-mail it if it suits you better. Thanks
What you're asking is for help in committing click-fraud.
Or perhaps you have some better explanation for wanting to automate visiting the same URL for no readily apparent reason every 2 seconds.
I didn't like the implication of this -fraud thing, so I googled click fraud and read the article on wikipedia (as I had no actual idea what click-fraud means). And after reading it all I can tell you is that you're rather stupid.
Why? Because if click-fraud was the case I would get caught within weeks because all clicks would come from the same IP adress, from the same ISP and from the same country. Plus, how would I make my browser click on my ads with that code if it only goes to a URL (and url for ads is always chaning).
Rather, my idea was to exchange data with a UK friend over MSN sharing folder service which is as simple as it gets. If it's empty than when you go on it, it automatically uploads a specified file (from a folder) onto the sharing page. And if it's not empty you simply download it instead. There is a trick (some kinda tweak) that makes the downloaded files also automatically erased,. However, it can only support files to a limited size. So the plan was he would keep uploading files and I would keep downloading them. Lovely.
And if you're not willing to help, at least stop with implications that I'm a criminal. Especially without evidence. It's not that I'm irritated by your genious idea, but could you post the code next time too...
And how is Salem going to know what you are trying to do, when you don't explain what you want to do? I had the same thought as Salem - perhaps because I too have a mind that says "if someone tries to do something like this and don't explain why, he/she is probably doing something that they don't want to spread around".
As to your question, perhaps using the program wget in combinatin with a bit of scripting and parsing would be the right way to go.
Another red flag was the "do it without showing any connection status". This to me means "I wanna write spyware".
Another red flag was "please email me the answer", as if you couldn't be arsed to do any of the work, or even revisit the forum where you posted.
There is a much simpler interface called FTP.
It's not like anyone is going to write a program based on such an awful spec as you posted in the first place.
Step 1 is read and understand "beej" (that's something else you can google, at least you've demonstrated you can do that much).
Step 2 is download wireshark and observe what a real network app (such as firefox) does in terms of network traffic when it does the things you want to.
Or as matsp says, use wget (or curl is another one) which provides an easily scriptable command line browsing capability.
@ matsp. True. I didn't specify anything. But it's pointless to simply start accusing someone of being a criminal just for not telling you the reasons... If you meet someone on the street, do you accuse them of trying to rob a bank if they ask you how to find it? Watch me roll my eyes...
@Salem. "do it without showing any connection status" would mean I would like to be able to watch movies on the same computer while continuing the process, and I would like them to watch full-screen without any bubbles like 'now connected' popping out of my right corner. It's actually that simple. I think you're just being paranoid, actually.
But atleast some help this time, so I guess you're not to be blamed after all. And as for specs - are they really that bad? No hidden sarcasm now. I really AM a newbie, so what would decent specs be? It's actually all that I want from that program - I'm actually unsure if the c++ is the right application to do this either. So what, you're proposing ftp? (if that is a programming language..)
What's socket programming?
A decent spec for what you want would tell things like:
1. What you want done.
I want to transfer a file from my friends MSN account to mine if the file is in a specific place. If my file is newer, then upload my file to the MSN account.
2. How you want it done.
Using standard HTTP protocol.
3. When you want it done.
I guess "Yesterday" on this one ;-)
Now, that would be something we could work on, all of us [with some slippage in the time-frame, but that's often the case in projects with optimistic time-plan] - because we know what we need to do, how we should do it, and when it needs to be done.
Some details may of course need to be updated.
FTP stands for "file transfer protocol", and is a traditional way to transfer files from one machine to another across a network link. It's rather modern, only about 20 or so years in existance.
Sockets are "network connections" in software [they could of course also be network sockets in the hardware sense of where you plug things in, but rarely do these need to be programmed!]. Socket programming is the programming of these connections. There are books written about this, as well as plenty of web-pages on the subject. But it's not something you do the day after you've written a "Hello World" program.