Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP socket programming

Tags:

php

I'm really new in client-server and socket programming.

Is it possible to write client-server file transfer and upload large file (4GB+) using php socket programming? Or should I use php ftp?

like image 494
Harts Avatar asked Jan 05 '12 19:01

Harts


People also ask

Can we use socket in PHP?

Conclusion – Socket Programming in PHPThe socket programming language is used to let the application work on the server and the client model. This approach of programming lets us establish the connection between the server and the client so that the exchange of the data could be facilitated.

Is socket programming still used?

Most current network programming is done either using sockets directly, or using various other layers on top of sockets.

What is socket programming?

A socket is a communications connection point (endpoint) that you can name and address in a network. Socket programming shows how to use socket APIs to establish communication links between remote and local processes.


1 Answers

Though it should be possible to write both the client & server parts with sockets in PHP, I would almost certainly opt for PHP's FTP extension, as most of the work handling files and building/tearing down connections is already done for you. http://www.php.net/manual/en/book.ftp.php

like image 194
Michael Berkowski Avatar answered Sep 21 '22 22:09

Michael Berkowski