Welcome! Log In Create A New Profile


Access Files from FTP

Posted by coyote999 
Access Files from FTP
May 20, 2014 12:25PM
Hi all,

need to index files from a ftp server.
I created a directory listing with links with PHP and added this PHP page to the Sphider sites.
But it seems that Sphider does not follow this links. (I switched on the option "Spider can leave domain"winking smiley

Does anyone have an idea or an alternative solution?

Re: Access Files from FTP
May 21, 2014 04:59PM
Create a HTML file containing head and body tags. Sphider needs all the HTML info to start the index procedure successfully.

Re: Access Files from FTP
May 23, 2014 09:28AM
Hi Tec,

I added a full HTML Header, but I get the message: "Page contains less than 10 words" when I try to index.
Here is my small PHP-Script: (I can open it in browser and follow the links)

<title>INDEX Test</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

$conn = ftp_connect('');
$user ="ftp";
$pass = "ftp";
$login = ftp_login($conn, $user, $pass);
$files = ftp_nlist($conn, '/FTP-test');
foreach ($files as $file) {

// Do something with the file here.

// For now we'll echo the filenames in a list
echo "<a href='ftp://ftp:ftp@".$file."'>".$file."</a><br />";


Thanks for your assist
Re: Access Files from FTP
May 23, 2014 12:28PM
The indexer will be unable to 'run' the PHP script you implemented into the body part. It just takes it like plain text. Consequently the indexer does not see all your href links and the $file variables. You will have to process your script before, and then offer the resulting HTML to the indexer.

Also I am not sure whether the indexer is able to parse something like
<a href='ftp://ftp:ftp@10. . . .
Never tried it. Please let us participate with your results.

Sorry, only registered users may post in this forum.

Click here to login