MORTE 78 Posted September 6, 2018 Share Posted September 6, 2018 <?php $Notice="Ide írod a magvas gondolataidat..."; //a következő 3 sor lehet nem kell, nem próbáltam nélküle $cleantext = array( "@", "ö", "Ö", "ü", "Ü", "ú", "Ú", "á", "Á"); $replacetext = array( "\x40", "\xF6", "\xD6", "\xFC", "\xDC", "\xFA", "\xDA", "\xE1", "\xC1" ); $Notice = str_replace($cleantext, $replacetext, $Notice); $socket = socket_create (AF_INET, SOCK_STREAM, SOL_TCP); $result = socket_connect ($socket, "szerver IP cím", "P2P port (pl 14000)"); $query = "\x04\x08\x00\x00\x00\x20".$Notice."\x00"; $query_size = strlen($query); $write_res = socket_write($socket, $query, $query_size); $recv_res = socket_recv($socket, $output, 5056, 0); socket_close($socket); ?> Erro: Fatal error: Call to undefined function socket_create() in /home/notice.php on l ine 8 Can anyone help me fix this problem or do I have a functional script I can share? Thank you in advance! Edit: Fix error but still not working: / Link to comment Share on other sites More sharing options...
ridetpro 116 Posted September 6, 2018 Share Posted September 6, 2018 You'll need to install (or enable) the Socket PHP extension Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now