Jump to content

Mahdi

Members
  • Posts

    34
  • Joined

  • Last visited

Posts posted by Mahdi

  1. excuse me boen thanks for your help but I need a program that using it I can run a live dialogue between server and clientsome thing like chat room but just with two person |------------------| | server: | |-------- | | ----------------- | |----------------- | |------------------| |------------------| | client: | |-------- | | ----------------- | |----------------- | |------------------|

  2. It looks as if you've swapped the client and server. Only the client echoes stuff, and it does so after it sends a message. The server should never echo anything, but should remain on until it is explicitly shut down. So try to run things the other way around: First, from the command line (this is VITAL!) run the file that currently gives the execution time error, and then run the file that currently produces the "??"s.
    please describe to me how should I do that?
  3. oh server side gives following response ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? and client gives following error Fatal error: Maximum execution time of 30 seconds exceeded in D:\Program Filess\xampp 1.7.4\htdocs\socket\PEAR2\Net\Transmitter\Stream.php on line 303 what does it mean?

  4. Remove any whitespace or any other code you may have before the "<?php"... do so in both files. Also, if you're using Notepad, save the file with ANSI encoding. If you're using another editor, save it as UTF-8 without BOM (Notepad can only save as UTF-8 with BOM).
    I did what you said and the error was changed like this Warning: require_once(PEAR2/Net/Transmitter/Autoload.php) [function.require-once]: failed to open stream: No such file or directory in D:\Program Filess\xampp 1.7.4\htdocs\socket\aa.php on line 2Fatal error: require_once() [function.require]: Failed opening required 'PEAR2/Net/Transmitter/Autoload.php' (include_path='.;D:\Program Filess\xampp 1.7.4\php\PEAR') in D:\Program Filess\xampp 1.7.4\htdocs\socket\aa.php on line 2
  5. Thanks a lot boen but it has following error in both of them: Fatal error: Namespace declaration statement has to be the very first statement in the script in D:\Program Filess\xampp 1.7.4\htdocs\socket\aa.php on line 2 what does it mean?

  6. in the name of Godhello guysI want to create a socket program using php, but at the first it has following error : socket_bind() [function_socket-bind]: Host lookup failed [0]: The requested name is valid, but no data of the requested type was found. in line 19. Could not bind to address. And my source is: <?php // Set time limit to indefinite execution set_time_limit (0); // Set the ip and port we will listen on $address = ' 192.168.0.1'; $port = 8080; // Create a TCP Stream socket $sock = socket_create(AF_INET, SOCK_STREAM, 0); // Bind the socket to an address/port socket_bind($sock, $address, $port) or die('Could not bind to address'); // Start listening for connections socket_listen($sock); /* Accept incoming requests and handle them as child processes */ $client = socket_accept($sock); // Read the input from the client – 1024 bytes $input = socket_read($client, 1024); // Strip all white spaces from input $output = ereg_replace("[ \t\n\r]","",$input).chr(0); // Display output back to client socket_write($client, $output); // Close the client (child) socket socket_close($client); // Close the master sockets socket_close($sock); ?> Above code is my server side program source Please tell me about the error. what does it mean?

  7. In the name of GOD

    hi guys:which one is most important javascript , jquery or ajax ?for learning JQuery is necessary learning something befor learning JQuery for example javascript or ....?Do you know some books for Beginners ?Thanks for your helping.

×
×
  • Create New...