PDA

View Full Version : need content viewing hack and source code please help


DataVampire
01-09-2005, 01:08 AM
hey im needing a script that will detect any files i upload to my server via ftp (example : phpatm (http://phpatm.free.fr/) this script will auto detect any items you upload via ftp into a folder then in the home page it will show

what im needing it the same thing that would need a vb template and one .php script and would use all the forum home images and all

this hack wont need the vb database at all only a down load now image
i hope this hack can be made

cinq
01-09-2005, 01:22 AM
You can watch the status of this hack (https://vborg.vbsupport.ru/showthread.php?t=73311).

Seems to be what you are looking for, and with the features planned, could prove to be a good download manager for vb.

DataVampire
01-09-2005, 01:28 AM
that hack dose not do what i need for it to do but its a nice hack tho

Joe Pimms
01-16-2005, 05:42 PM
this hack would be cool i hope some one can do this ?

Joe Pimms
01-16-2005, 05:45 PM
i found this to view files and directorys

<?php
$dir = "/etc/php5/";

// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
}
closedir($dh);
}
}
?>

i hope this will help any of you good php coders in the makeing of this hack

Joe Pimms
01-16-2005, 05:48 PM
here is an other one i found


Here's another recursive function that prints out everything from the starting path to the end. It doesn't have any search function, but just another example. I wrote it for getting a quick hierarchial view of websites (even through Dreamweaver will show it to me, it'd be a chore to go through each folder and expand it).


<?php

// map_dirs(path,level)
// path, level to start (start at 0)

map_dirs("/var/ww/html/",0);

function map_dirs($path,$level) {
if(is_dir($path)) {
if($contents = opendir($path)) {
while(($node = readdir($contents)) !== false) {
if($node!="." && $node!="..") {
for($i=0;$i<$level;$i++) echo " ";
if(is_dir($path."/".$node)) echo "+"; else echo " ";
echo $node."\n";
map_dirs("$path/$node",$level+1);
}
}
}
}
}

?>


all from here:
http://ca3.php.net/manual/en/function.opendir.php