added tips to lamer.bash help
[mirrors/Programs.git] / php / skripty / stdin_socket.php
CommitLineData
8de51304
H
1<?php\r
2\r
3$sfp = fsockopen ("127.0.0.1", 24, &$errno, &$errstr, 5);\r
4$ifp = fopen ("php://stdin", "r");\r
5\r
6/*\r
7while(1) {\r
8echo(ord(fgetc($ifp)));\r
9}\r
10*/\r
11\r
12while($sfp) {\r
13 if (!feof($sfp)) { \r
14 echo (fgetc($sfp));\r
15 }\r
16\r
17 if (!feof($ifp)) { \r
18 fwrite ($sfp, fgetc($ifp));\r
19 }\r
20}\r
21\r
22?>\r
This page took 0.357678 seconds and 4 git commands to generate.