03-12-2009 04:04 AM
Hello,
I would like to rewrite or start this Skipt via LV.
But I've no idea how to realize it.
Can somebody give me a hint?
<?
$empfang = "12345;23456;777777;88888888;999999";
$request = "";
$param["id"] = "XXXXX";
$param["pw"] = "XXXX";
$param["type"] = "2";
$param["empfaenger"] = $empfang;
$param["absender"] = "testapp";
$param["befehl"] = "Temp +10";
$param["reply"] = "1";
$param["reply_email"] = "E-Mailadresse";
$param["termin"] = "TT.MM.JJJJ-SS:MM";
$param["id_status"] = "1";
$param["massen"] = "1";
foreach($param as $key=>$val){
$request.= $key."=".urlencode($val);
$request.= "&";
}
$url = "http://www.meineseite.de/app/test.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
03-12-2009 04:11 AM
Hi Wulfi,
can you explain a bit more? Where do you have problems? Which part do you want to rewrite, where do the new data come from?
Mike
03-12-2009 05:02 AM
I want to give some values to a php site and then i get a value back..
I want to send and receive this data without the Internet exploerer becuase otherwise the logindata is displayed.
03-12-2009 05:37 AM
Hi Wulfi,
you can use HTTP to send your parameters to your php page. See this link for an example
http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=324049#M324049
Another possibility is to use the IExplorer ActiveX Control.
Mike
03-12-2009 05:41 AM
You may want to look at this post on the LAVA forums that dicusses using curl with LabVIEW.
03-12-2009 06:06 AM
Thanks.
Now I found a variant to control the IE via ActiveX and make it invisable. So it works.