Implementing the libcurl interface involves four steps: initialization, setting options, performing the curl operation, and clean-up. To customize the fetching of data, further options are set, including forwarding and error-handling. By setting the proper options, you can perform any web access with libcurl than you can with curl at the command prompt.
- The libcurl library lets you send or retrieve information … to or from the internet in a four step process. … First, you initialize the easy curl interface, … which returns a curl handle, like a file handle, … used to access the data. … Second, you set options for the curl handle, … which include the URL, data handling, air handling, … and so on. … Third, you perform the curl operation. … And finally, you clean up curl, … similar to closing an open file. … This code shows the most basic of curl programs … which fetches text data from a website. … The URL is assigned to a string address at line nine. … Libcurl is initialized at line 12, … with the results assigned to the curl variable CURL … declared at line seven. … Now if this variable is null, … an error messages output, and the program halts. … The only option set is a webpage address … by using the curl_easy_setopt function at line 21. … Now multiple calls to this function can be made … depending on what you're doing with libcurl. …
- 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.