The libcurl library allows you to upload files or raw data to an FTP site as well as submit form fields to a website. For a file upload, the file's data must be read into memory and then uploaded. For form data, you must know the form field names to supply input.
- [Instructor] This exercise file uses the FTP protocol … in the libcurl library to upload an image file to a website. … A website placeholder is specified at line 19. … To make this code run legitimately, … this string must be replaced … with a valid FTP site address, … including directories and a file name. … Line 20 sets the username and password for the FTP site. … Again, these values are placeholders. … The file is specified at line 21 and it is available … with the exercise files. … The first step in the process is to open the file … and store it in memory. … Line 31 opens the file, … then storage is allocated for a buffer. … The data chunk structure is used, … which is declared back at line 12, … and it's required for the callback function … which puts the information to the FTP site. … A while loop starting at line 48 reads the file. … It also reallocates storage as required. … And the file is closed at line 70 … with its data now stored in memory. … Line 73 initializes the easy curl interface. …
- Finding, installing, and linking libraries
- Accessing and generating XML data
- Working with JSON
- Working with the libcurl library
- Text programming
- Reading, writing, and manipulating JPEG images
- Working with PNG images
Skill Level Advanced
1. Setup and Configuration
2. Data Structures
3. Web Access
4. Text Programming
5. Computer Graphics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.