I am currently getting a false result from my var_dump. Is there any way to get the result of folders and files on the root directory from a FTP account.
<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "ftp://www.xxxx.co.uk");
curl_setopt($ch, CURLOPT_USERPWD, "[xxxx]:[xxxx]");
// grab URL and pass it to the browser
$result = curl_exec($ch);
var_dump($result);
// close cURL resource, and free up system resources
curl_close($ch);
?>
Why don’t you use
ftp_connect