View Full Version : auto Submit PHP's
Ron
October 13th, 2002, 12:55 PM
Yes, that is the exact php file that you downloaded, what do you want to do ? *exactly*
Ron
October 13th, 2002, 12:55 PM
Ah but please learn a little php your self! It's not that difficult.
sandman
October 13th, 2002, 12:55 PM
What do I need to do to auto submit a php file and also close it utomatically.
this is what I have:
<?php
// php girder control example.
// WARNING DO NOT INSTALL LIKE THIS ON THE INTERNET, ABUSE IS GARANTUEED
// Function written by desmo
function sendMsg($args) {
$fp = fsockopen($args["host"],$args["port"], &$errno, &$errstr);
if (!$fp) { //Something didn't work....
echo "ERROR: $errno - $errstrn";
exit;
} else {
fputs ($fp, "$args[pword]nr"); //Send the Password
fputs ($fp, "$args[command]nr");
// this is for not quite mode
fputs ($fp, "closenrnr"); //needed to close the connection
// fputs ($fp, "nrnr"); //needed to close the connection in quiet mode
}
fclose($fp);
return;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<?php
if (! isset ($host) )
{
?>
<form method="post" action="open1.php">
<table>
<tr><td>Hostname</td><td><input type=text name=host value="192.168.1.100"></td></tr>
<tr><td>Port</td><td><input type=text name=port value="9001"></td></tr>
<tr><td>Password</td><td><input type=text name=pword value="test"></td></tr>
<tr><td>Command</td><td><input type=text name=command value="open"></td></tr>
<input type=submit value="Send" name="go">
</tr></table>
</form>
<?php
}
else
{
sendMsg($HTTP_POST_VARS);
?>
Sending...
<?php
}
?>
</body>
</html>
Thank you for the help,
Sandman
sandman
October 13th, 2002, 12:55 PM
OK, I would like to have the php auto submit. With the PHP above it opens a window and you have to press the submit button, I would like it to open a window that says sending.... and then close the window without having to press the submit button.
Thanks,
Sandman
sandman
October 13th, 2002, 12:55 PM
I've spent all day trying to learn some PHP but I still have not found anything on how to auto submit this PHP file, can you tell me what to search for or a place to start or even what word to use?
thanks
Sandman
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.