Jump to content

Help erro API


Recommended Posts

<?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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.