So I currently have (functions.php)
1 function onlineplayers() {
2 $fp = fsockopen('12.34.56.78', 12345, $errno, $errstr, 4);
3 fwrite($fp, '\xFE');
4 $answer = fread($fp, 256);
5 ...
6 }
to ping a webserver and embedded with
1 <?php require("functions.php"); ?>
but running the site gives
Parse error: syntax error, unexpected ' ' (T_STRING) in functions.php on line 3
But what is the problem? I tried just to do fwrite("a", "a"); but it won't work.