|
@@ 960-962 (lines=3) @@
|
| 957 |
|
// Request a passive connection - this means, we'll talk to you, you don't talk to us. |
| 958 |
|
@fwrite($this->connection, 'PASV' . "\r\n"); |
| 959 |
|
$time = time(); |
| 960 |
|
do |
| 961 |
|
$response = fgets($this->connection, 1024); |
| 962 |
|
while (strpos($response, ' ', 3) !== 3 && time() - $time < 5); |
| 963 |
|
|
| 964 |
|
// If it's not 227, we weren't given an IP and port, which means it failed. |
| 965 |
|
if (strpos($response, '227 ') !== 0) |
|
@@ 1083-1085 (lines=3) @@
|
| 1080 |
|
|
| 1081 |
|
@fwrite($this->connection, 'PWD' . "\r\n"); |
| 1082 |
|
$time = time(); |
| 1083 |
|
do |
| 1084 |
|
$response = fgets($this->connection, 1024); |
| 1085 |
|
while ($response[3] != ' ' && time() - $time < 5); |
| 1086 |
|
|
| 1087 |
|
// Check for 257! |
| 1088 |
|
if (preg_match('~^257 "(.+?)" ~', $response, $match) != 0) |