Reply to Re: [PHP] sockets

Your name:

Reply:


Posted by Andrι Medeiros on 07/12/05 19:23

On Tue, 2005-07-12 at 09:58 -0500, Greg Donald wrote:
> On 7/12/05, daro <daro@statsms.net> wrote:
> > I don't know where should I put this script to be able to receive all datas and respond
> > with proper strings.
>
> You would run the script as a shell script from the command line.
>
> On windows you can just save the code as a regular php script then
> start it up from a DOS prompt like:
>
> c:\PHP\php.exe -f yoursocketfile.php
>
> or if you are using a *nix setup run it just as it is, making sure the
> first line points to your php binary, for example mine is
> /usr/bin/php. Chmod it so it's executable.
>
>
> --
> Greg Donald
> Zend Certified Engineer
> MySQL Core Certification
> http://destiney.com/
>

More specificlly,

------------------------------8<-------------------------
#!/usr/bin/php
<?php
// your script here
?>
------------------------------8<-------------------------

And then
$ chmod +x socket.php
$ ./socket.php &


OR

$ /usr/bin/php -q socket.php &


If your on *NIX, remember the last & to put the process on the
background. Not sure how one would go on windows tho :(

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация