{"id":6294,"date":"2019-08-09T06:47:27","date_gmt":"2019-08-09T06:47:27","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=6294"},"modified":"2019-08-09T06:47:27","modified_gmt":"2019-08-09T06:47:27","slug":"learn-to-use-curl-program","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/","title":{"rendered":"Learn to use cURL program"},"content":{"rendered":"<h2>What is cURL?<\/h2>\n<p>cURL is a tool that is used to transfer data from or to a server, with the help of using one of the protocols from DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, POP3, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP.<\/p>\n<p>This article will explain how to use the cURL program to transfer files from the command line.<\/p>\n<h2># When to use cURL?<\/h2>\n<p>Whenever you want to transfer a file quickly from the command line, cURL program is the easiest way to do so. For example, if for your project you need to download a .zip file or .tar.gz file that contains a code library of your project then with the help of cURL you can download the file directly to your account, instead of using an FTP client to download and transfer the file to your account.<\/p>\n<h2>#Using CURL<\/h2>\n<p>To use cURL log in to your MilesWeb account using SSH, and then type the following command :<\/p>\n<div style=\"background-color: #e0ffff;padding: 10px\"><strong>curl<\/strong><\/div>\n<p>Still, you will have to download a page from the example.com test domain :<\/p>\n<div style=\"background-color: #e0ffff;padding: 10px\"><strong>curl -O http:\/\/example.com\/test.html<\/strong><\/div>\n<p>cURL will download the page to the current working directory. The -O option instructs cURL to download the output and save it in a file name that already has the same name as the source document. Here it is test.html. So if you open the test.html file on your account, you will see the HTML source page for example.com\/test.html.<\/p>\n<p>In case you want to download a file and assign it a specific filename, use the -o option. For example, in order to download the example.com\/test.html file to a file on the local account named download.html, you need to type the following command :<\/p>\n<div style=\"background-color: #e0ffff;padding: 10px\"><strong>curl -o download.html http:\/\/example.com\/test.html<\/strong><\/div>\n<p>These are just the basic commands. There are more options available in cURL program and to learn them type the following command :<\/p>\n<div style=\"background-color: #e0ffff;padding: 10px\"><strong>man curl<\/strong><\/div>\n<div><\/div>\n<div><strong>Also Read :<\/strong><\/div>\n<div><\/div>\n<div><strong>1) <a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-configure-firewall-using-iptables\/\">Learn to configure Firewall using iptables<\/a><\/strong><\/div>\n<div><\/div>\n<div><strong>2) <a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/configure-contact-form-with-smtp-php-mail\/\">How to Configure Contact Form with SMTP\/PHP Mail?<\/a><\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>What is cURL? cURL is a tool that is used to transfer data from or to a server, with the help of using one of the protocols from DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, POP3, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP. This article will explain how [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[928],"class_list":["post-6294","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-web-hosting-faq","tag-curl-program"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn to use cURL program - Web Hosting FAQs by MilesWeb<\/title>\n<meta name=\"description\" content=\"Easy steps to learn cURL program.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn to use cURL program - Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"og:description\" content=\"Easy steps to learn cURL program.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-09T06:47:27+00:00\" \/>\n<meta name=\"author\" content=\"Sonam Wagh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sonam Wagh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/\",\"name\":\"Learn to use cURL program - Web Hosting FAQs by MilesWeb\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2019-08-09T06:47:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\"},\"description\":\"Easy steps to learn cURL program.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn to use cURL program\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\",\"name\":\"Sonam Wagh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g\",\"caption\":\"Sonam Wagh\"},\"description\":\"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/sonam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn to use cURL program - Web Hosting FAQs by MilesWeb","description":"Easy steps to learn cURL program.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/","og_locale":"en_GB","og_type":"article","og_title":"Learn to use cURL program - Web Hosting FAQs by MilesWeb","og_description":"Easy steps to learn cURL program.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2019-08-09T06:47:27+00:00","author":"Sonam Wagh","twitter_misc":{"Written by":"Sonam Wagh","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/","name":"Learn to use cURL program - Web Hosting FAQs by MilesWeb","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2019-08-09T06:47:27+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4"},"description":"Easy steps to learn cURL program.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-use-curl-program\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Learn to use cURL program"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4","name":"Sonam Wagh","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g","caption":"Sonam Wagh"},"description":"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/sonam\/"}]}},"views":571,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=6294"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6294\/revisions"}],"predecessor-version":[{"id":6295,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6294\/revisions\/6295"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=6294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=6294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=6294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}