Forum Moderators: coopster
i.e. if i write some code in php, and i want it to be a program that runs in the background... say, listens for information that comes in the sockets.
how would I implement this? also, how would i make the php file into an executable that doesn't need to be opened from internet explorer?
e.g. like in c++ you would compile the source code and an exe file would result. however, this is not the case with php. what could i do to make the server run the php code without requiring me to open it in the browser?
I am confused. thanks a lot!
As far as listening to a socket, I wouldn't know where to begin, but here is how to execute the php script.
For example script test.php:
chmod a+x test.php
test.php:
#!/usr/local/apache/bin/php -q
<?php
echo 'Test';
?>
[zend.com...]
and what i don't get is the pragraph which says
"In order to run the program, make sure that the first line #!/usr/local/bin/php –q is the location of the PHP CLI (or CGI) binary. You will need to change the mode so it is executable (chmod 755 socket_server.php – where socket_server.php is the name of the file) and run it using ./socket_server.php
from the command line."
Since i am using a windows system, how do i access the command line?
i don't really understand the prerequisites either. i am running an apache server with php support. erm.. i'm sorta new at this. haha thanks for the help!