Any chance you could post your source? I'd like to modify this for a web controlled RC Car, and I'm much more familiar with PHP than CGI.
Hm.. not sure I can give you the source code I used.. I haven't done any automation work in over a year (except for the Mediaplayer-thing) and as I am an uncurable perfectionist I have made numerous incarnations of the scripts though never getting 100% satisfaction with any of them. x(
The source you want, is it the VB part or the php part? For the php part I think I can type up a quick example here, but if you want an example VB application I'd have to hack something together. Just tell me though, I'd be happy to help! ![]()
example: backend.php
<?php
if(!empty($_GET['port']) && is_numeric($_GET['port']) && !empty($_GET['data']))
{
$fp = @fsockopen('localhost', 1000);
if($fp)
{
fputs($fp, "set:".$_GET['port'].":".$_GET['data'].":\r\n"
}
else
{
die('Could not connect to server!');
}
fclose($fp);
}
?>
This is a pretty simple example. The file backend.php takes 2 paramenters, port and data, opens a connection to a server (localhost is this case), and sends a command.
If you create a link to backend.php?port=3&data=ON it will send "set:3:ON:" to the server.
Of course, you need a backend that recieves the connection, and sends the data on to the Arduino.
Just let me know if you need any help! d(^_^)