Jump to content

vivendi

New Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

vivendi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I have created a new Unit Testing and Mocking framework and I would like to know if it works out for other people as well besides me. It's really easy to get started with. You can find the framework on my GitHub page: https://github.com/w00/Chinook-TestSuite Also feel free to "Watch" or "Star" the project, that would really help me as well
  2. Hello, i want to use the socket functions of php but i have a problem with socket_recv(). I have a server running on a computer. This server just waits for a connection. So i created a file, index.php, with code that connects to that server with the socket functions of php. When the connection is made a immidiatly send a string with the php function socket_send(), the server reacts of this succesfully and immidiatly sends a string back. But this is the part where i have problems, cause php doesn't receive anything at all. Anyone an idea what im doing wrong..?? This is my php code so far: <?php $client = array(); $client['server'] = "127.0.0.1"; $client['poort'] = "7070"; if ( !$sock=socket_create ( AF_INET, SOCK_STREAM, SOL_TCP ) ) { die("De socket kon niet worden aangemaakt."); } if ( !socket_connect( $sock, '127.0.0.1', '7070' ) ) { die("Kon geen verbinding maken met de server: <b>".$client['server']."</b>. Misschien fout?"); } $buf = "getlist"; $recvbuf = ""; socket_send ( $sock, $buf, strlen($buf), 0 ); socket_recv ( $sock, $recvbuf, strlen($recvbuf), 0 ); echo "A: ".$recvbuf; ?>
  3. Then i get the following error: Fatal error: Only variables can be passed by reference in C:\Program Files\Apache Group\Apache2\htdocs\remote\index.php on line 6
  4. Hey, im trying to use the socket function with php. I want to connect to another listening host on port 7070 (which is running local too). I have the following php code, but i get an error when i try it. It also says that its connected, but thats not possible because the server that listens for the incoming connections isn't running yet. Here's the code that i have and the error below that. <?php $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); //socket_set_nonblock($sock); socket_connect($sock,"127.0.0.1", 7070); socket_set_block($sock); switch(socket_select($r = array($sock), $w = array($sock), $f = array($sock), 5)) { case 2: echo "[-] Connection Refused\n"; break; case 1: echo "[+] Connected\n"; break; case 0: echo "[-] Timeout\n"; break; } ?>
  5. Yeah i just figured those commands out by googling. Im gonna redo the whole thing and use ftp commands. So everything is offline right now untill the new one is finished.
  6. Yeah i just noticed that im not able to remove files on a linux server. I tested it on a windows environment. Any idea's what i can do about this?? Chmod and chown wont work, cause i get a "Operation denied" warning.... :( I wonder how other programs like this are working, like Plesk. Its also build with php and its able to do everything...
  7. Hello, i would like some critics, not about my website, but about an application i made in php. The application is called phpMyFTP, this is not really a ftp as you might guess, but its a filemanager, so its basically the same thing. With it you can manage your files through your webbrowser. You can do things like, edit files, copy/move, upload and download files and some other things. I would like to know what you think about the looks, and if you're going to try it out, if you can find any bugs in it. Its still a BETA so there are probably some holes in it. Anyway, let me hear what you think abou it. Here's the link to the download page. You can also see the screenshots on that page. [url=http://www.phpmyweb.net/downloads.html]downloads + screenshots[/url]
×
×
  • Create New...

Important Information

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.