I am trying to test a Script which I got online and
will modify later (its from devshed)...  It fails to set
up a connection...

#!/usr/local/bin/php -q
<?
// don't timeout!
set_time_limit(0);

// set some variables
$host = "1.2.3.4...";
$port = 1234;
$command = "/usr/games/fortune";

// create socket
$socket = socket(AF_INET, SOCK_STREAM, 0) or die("Could not create
socket\n");

// bind socket to port
$result = bind($socket, $host, $port) or die("Could not bind to
socket\n");

/*  start listening for connections
*   My Script Fails here...
 *  Any suggestions why it fails the Socket SetUp...
 *  Should I screw around with the port numbers?
 */
$result = listen($socket, 3) or die("Set up Failed!");
echo "Waiting for connections...\n";






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to