how curl works
What is CURL ?
cURL is basically a Client URL Library or a Command line tool, can be considered as a non-interactive web browser which is used to move data to or from server which supports various protocols such as:
(DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP)
cURL allows users to perform multiple files download / uploads with a single command. Multiple URLs can be specified in single command and they will be fetched in given order. It also supports proxy details, file uploads via FTP, sending requests over HTTP protocol, establishing connections via SSL, getting and setting cookies, user and password authentication, SMTP authentication and sending emails, authentication via POP3 and IMAP and many more. Simply, cURL can be used for everything that is related to data transfer using Internet protocols.