Links externos
cURL es una herramienta de línea de comandos para la transferencia de datos usando el protocolo URL. Posee soporte para DICT, FILE, FTP, FTPS, GOPHER, HTTP, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S y muchos más. Admite la autenticación mediante certificados SSL, autenticación standard mediante usuario y contraseña, proxies, cookies, tunneling y muchas técnicas más.
Por ejemplo, si deseamos obtener los headers de respuesta de un servidor, ejecutamos:
curl -I -L http://google.com.ar
La respuesta que recibimos es
HTTP/1.1 301 Moved Permanently Location: http://www.google.com.ar/ Content-Type: text/html; charset=UTF-8 Date: Mon, 28 Feb 2011 14:35:20 GMT Expires: Wed, 30 Mar 2011 14:35:20 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 222 X-XSS-Protection: 1; mode=block HTTP/1.1 200 OK Date: Mon, 28 Feb 2011 14:35:21 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 Set-Cookie: PREF=ID=a87b3140c2a2b90c:FF=0:TM=1298903721:LM=1298903721:S=hOBQyoYt I1cHHZht; expires=Wed, 27-Feb-2013 14:35:21 GMT; path=/; domain=.google.com.ar Set-Cookie: NID=44=W7Acep4KyXNon5blTuiYu42VOB5cPO4RA1uCqnVlich9lfZL6VNwPhOrVFW2u EDzYui2hkH0j5YI8zdN9QQst-RZeZNV6C23spz-rtaUE2T8_7_uodY5_CqzWsOjyuos; expires=Tue , 30-Aug-2011 14:35:21 GMT; path=/; domain=.google.com.ar; HttpOnly Server: gws X-XSS-Protection: 1; mode=block Transfer-Encoding: chunked
La herramienta de cURL funciona en prácticamente todos los sistemas operativos, incluido Windows
