PHPverse 2025

Voting

: six plus one?
(Example: nine)

The Note You're Voting On

bluerain [at] telenet [dot] be
15 years ago
To overcome the 2GB file size limit, you can open your own socket to get the file size of a large file. Quick and dirty script:

<?php
$socket
=fsockopen($hostName, 21);
$t=fgets($socket, 128);
fwrite($socket, "USER $myLogin\r\n");
$t=fgets($socket, 128);
fwrite($socket, "PASS $myPass\r\n");
$t=fgets($socket, 128);
fwrite($socket, "SIZE $fileName\r\n");
$t=fgets($socket, 128);
$fileSize=floatval(str_replace("213 ","",$t));
echo
$fileSize;
fwrite($socket, "QUIT\r\n");
fclose($socket);
?>

<< Back to user notes page

To Top