LinksTraffic

Poster des donées via Socket

english directory french directory
Recherche: Recherche avancée

Accueil Webmaster | Tutoriaux | Web Scripts

Super Tirage - Ouah

Poster des donées via Socket

Faites un copier coller du code ci-dessous et lancez le dans votre navigateur.
Si vous souhaitez voir le résultat en démo (selon nous une bonne méthode d'apprentissage) cliquez ici (nouvelle fenêtre).

This example uses the fsockopen to connect to an url which can be via any port (even the ssl one), posts some data and reads the output page as well as the headers.

The source code:

Notes:
- we use the fsockopen and the fputs functions to open a socket and write throught it;
- in order to use the ssl port, we will need to have openssl compiled into PHP;
- you can retrieve and send session and cookies ids from reading and writing in headers; and often you will need these data in order to access the results from a post request.

You may wish to read additional materials from:
- http://us.php.net/fsockopen
- manual/en/function.fgets.php
- function.fputs.php
- manual/en/transports.php

Commentaires

Poster un commentaire
ou venez en discuter sur:
Forum - Php

Coin du Webmaster

Vous disposez d'un site à forte audience?

Obtenez votre Kit Graphique pour vos sites!

Engagez des Freelance Pro.

1and1 Internet

Categories

Copyright 2004-2008 @ LinksTraffic RHM Solution ::: Partners | Privacy | Contact us form