2010-11-24 40 views

Répondre

2

Voici un exemple qui utilise la boucle PHP pour envoyer des données POST:

<? 

$ch = curl_init(); 

$data = array('var1' => 'Foo', 'var2' => 'Bar'); 

curl_setopt($ch, CURLOPT_URL, 'http://localhost/'); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 

curl_exec($ch); 
?> 

Vous pouvez trouver plus d'informations sur boucle dans the PHP documentation.