-
November 7th, 2010, 04:50 PM
#1
uploading files to a website in c++
Hi guys,
I'm looking for a way to make a program upload a text file to my website.
Is there some sort of function for that?
Thanks in advance!
-
November 7th, 2010, 05:14 PM
#2
Re: uploading files to a website in c++
Usually files are uploaded by ftp, so you could make a ftp-client. But there are a lot of them so why build one.
-
November 7th, 2010, 05:52 PM
#3
Re: uploading files to a website in c++
Originally Posted by Skizmo
Usually files are uploaded by ftp, so you could make a ftp-client. But there are a lot of them so why build one.
Do you have any sample code for that please?
-
November 7th, 2010, 07:51 PM
#4
Re: uploading files to a website in c++
-
November 7th, 2010, 08:49 PM
#5
Re: uploading files to a website in c++
Yes, naturally I've tried using google to find the answer.
There's a lot of code out there, but I haven't been able to find anything that actually
- allows uploading files to a website
- works (without giving tons of errors or refers to .h or .lib files that are made available)
So for that reason I thought I'd ask if anyone in the visual C++ community knew of sample code that doés work.
-
November 8th, 2010, 03:28 AM
#6
Re: uploading files to a website in c++
- allows uploading files to a website
You don't upload files to a website, you upload files to a ftp server.
- works (without giving tons of errors or refers to .h or .lib files that are made available)
Ftp is a simple text command interface so you can send and receive files/info, nothing more.
Here you go, a simple ftp class.
-
November 8th, 2010, 05:58 AM
#7
Re: uploading files to a website in c++
>You don't upload files to a website, you upload files to a ftp server.
Not quite. If the web page supports input type="file", then you can use HTTP to upload files as well.
-
November 8th, 2010, 07:11 AM
#8
Re: uploading files to a website in c++
Originally Posted by codalith
>You don't upload files to a website, you upload files to a ftp server.
Not quite. If the web page supports input type="file", then you can use HTTP to upload files as well.
Yes, but that is a html tag, so the page itself supports this. OP wants to do it from his C++ code.
-
November 8th, 2010, 07:30 AM
#9
Re: uploading files to a website in c++
If the web page supports that tag, then he can use httpwebrequest or similar to upload the text file to his website.
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
|