Bonjour.

Pour un projet personnel, j'aurais besoin d'envoyer une commande (curl) en php à un appareil qui possède une interface web.
Une partie de mon projet consistait à "parser" les informations de la page, ce qui est fait. (curl_setopt)
J'ai plus de mal à comprendre l'envoie d'une commande dans ce cas. (CURLOPT_POSTFIELDS)
La page du bouton en question.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
<form name="formControl">
<div class="table2" style="padding-left:10px; padding-top:10px;">
    <table border="1" cellpadding="0" cellspacing="1" WIDTH="234" height="340" bordercolor="#98A6B7">
      <tr>
      	<td class="proj">
      		<input type="button" id="btn_powon" name="btn_powon" value="Power On" style="WIDTH:124px; HEIGHT:23px; font-size:13px;" onclick="request_projector_info(this, 0)">
      	</td>
        <td class="proj"> 
        	<input type="button" id="btn_powoff" name="btn_powoff" value="Power Off" style="WIDTH:124px; HEIGHT:23px;font-size:13px;" onclick="request_projector_info(this, 0)">
        </td>
			</tr>
Si je comprends bien, ON et OFF passent par une fonction JS.
Mais comment générer ce bouton avec CURLOPT_POSTFIELDS ?

Merci pour votre aide.