programmation_socket
Ceci est une ancienne révision du document !
Table des matières
HTTP et HTTPS
Lib pour C a tester: libcurl !
Lien: http://curl.haxx.se/
Exemple avec HTTPS: http://curl.haxx.se/lxr/source/docs/examples/https.c
Commande curl
En ligne de commande on peut utiliser simplement curl
.
Lien: http://curl.netmirror.org/docs/httpscripting.html
Installation:
# aptitude install curl
Exemple:
$ curl http://www.thierry-jaouen.fr
Ou
$ curl -k https://www.thierry-jaouen.fr
Post:
$ curl http://www.thierry-jaouen.fr/cgi-bin/fuckyourself -d "param1=toto¶m2=tata"
FTP, lister les fichiers:
$ curl ftp://ftp.thierry-jaouen.fr --disable-epsv -u thierry:password
FTP, telecharger:
$ curl ftp://ftp.thierry-jaouen.fr/<FICHIER> --disable-epsv -u thierry:password -o <FICHIER>
A savoir:
-v ⇒ verbose
-o <file> ⇒ fichier ou ecrire les données recu (sinon, c'est STDOUT )
Socket C
Non-blocking
Solution pour détecter une connexion qui echoue: http://cr.yp.to/docs/connect.html
programmation_socket.1250632820.txt.gz · Dernière modification : 2009/08/18 22:00 de thierry