![]() |
| | #1 |
| Registered User Join Date: Sep 2009
Posts: 1
| HELP -Upload to Target FTP- I have my basics down. I've been working on a project on my own to just start learning C++\C I have a simple program down to record error events from a video game I play and save them to a text file it saves. Now say I have an ftp, upload location, or twitter account. What type of source am I looking at for a secondary program to automatically upload changes made to my log? It'd have to run in the background so no one messes with it at home. =/ yeah I'm a game addict. Sorry if I'm a little vague, maybe thats why I'm not finding an answer to this. If anyone could point me in a good direction or maybe give me some example code to work on that be awesome. |
| s0nicstr1fe is offline | |
| | #2 |
| CSharpener Join Date: Oct 2006
Posts: 5,242
| why do you need a program? write small batch file that uses ftp command to upload file start this batch on scheduler...
__________________ If I have eight hours for cutting wood, I spend six sharpening my axe. |
| vart is offline | |
| | #3 |
| Deprecated Join Date: Oct 2004 Location: Canada
Posts: 944
| He already has a program. He wants to create it for learning purposes. You need to send a series of HTTP commands (headers) to the designated website. You can use something like LiveHttpHeaders for Firefox to check which headers to send in order to upload a file (ie. GET something / POST something etc). I'd recommend a library (sort of) such as Asio (boost::asio), or libcurl. Most people just use the cURL program (via command-line arguments), or the cURL wrapper for PHP, but it starts out as a C library you can easily use from C++. All the PHP cURL information on Google is actually helpful since they use basically the same interface. There's plenty of cURL source code so you'll have it running in no time. It doesn't seem necessary, but it'll teach you a thing or two.
__________________ Warning: Have doubt in anything I post. GCC 4.5.0 (lambda branch), Boost 1.40.0, Code::Blocks 8.02, Ubuntu 9.04 010001000110000101100101 |
| Dae is offline | |
| | #4 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| I'd recommend checking out codeproject.com for C/C++ code. I found some ftp uploading code there some time ago.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to program in unix | Cpro | Linux Programming | 21 | 02-12-2008 10:54 AM |
| Simple FTP Upload in C (In backround) | 108Stylez | C Programming | 5 | 10-31-2006 03:41 AM |
| How to fix misaligned assignment statements in the source code? | biggyK | C++ Programming | 28 | 07-16-2006 11:35 PM |
| FTP Server :: Winsock | kuphryn | Windows Programming | 2 | 10-03-2002 07:14 PM |
| FTP Upload | Smoose777 | C# Programming | 1 | 08-13-2002 05:58 PM |