====== 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 ===== Perl et Curl ===== ==== https ==== Lien: http://curl.haxx.se/docs/sslcerts.html ===== 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/ --disable-epsv -u thierry:password -o A savoir: -v => verbose -o => fichier ou ecrire les données recu (sinon, c'est STDOUT ) ===== libcurl ====== ==== Installation ==== Comme il y a deja libcurl3 d'installer sous ma Lenny, autant installer les outils de developpement de ce même libcurl (car il y a aussi libcurl4 ... point a eclaircir) # aptitude install libcurl3-gnutls-dev Mais je m'aperçois qu'en fait, ca serait **''libcurl4''** qui s'installe... $ dpkg -l ... ii libcurl4-gnutls-dev 7.18.2-8lenny2 ==== Tuto ==== Lien: http://curl.haxx.se/libcurl/c/libcurl-tutorial.html ====== Socket C ====== ===== Non-blocking ===== Solution pour détecter une connexion qui echoue: [[http://cr.yp.to/docs/connect.html]]