This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // convert utf8 character to its unicode code point | |
| function utf8decode($chr){ | |
| switch(strlen($chr)){ | |
| case 1: | |
| $x = unpack('c',$chr); | |
| $dec = $x[1] & 127; | |
| break; | |
| case 2: | |
| $x = unpack('c*',$chr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // 160x120 image pixel dimensions | |
| // PPM Header | |
| echo "P3\n"; | |
| echo "160 120\n"; | |
| echo "255\n"; | |
| $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); |
OlderNewer