I am attempting (if this is possible) to write a routine to automatically dump the contents of a directory on the server into a directory on the local C drive.
I started out like this :
Code: $conn_id = ftp_connect($myurl);
$login_successful = ftp_login($conn_id, $id, $password);
if ($login_successful) {
echo '<H2>Download underway ...'.PHP_EOL;
$contents = ftp_nlist($conn_id, $the_appropriate_path);
foreach ($contents as $file) {
echo $file.'<BR>'.PHP_EOL;
}
And this does exactly as expected, it lists all the files in the directory on the server !
Now I have to dump them onto my C drive. Is this possible using ftp_get, or do I have to use some other way ?
file_put_contents and createimagefromjpeg
All,I do somethings and then I have the following code:file_put_contents('./test/'.$filename,$attachment_raw); //Give full path to $filenameI then do:$im = imagecreatefromjpeg($path_to_image_directory
Need help urgant
why down my code ony return one item instead of all the items selected. $arr =
Strange array issue, never happened before.
mysql_fetch_array returns 1 array per call. Generally that's why it is inserted into a while statement. I generally loop through them in a while statement and put them all in a master array so I
listing help
Hi,at first, great new design!!! I like it,i got a problem,I want to list some tekst, but there is a users, users can list they own texts, and all teksts, and find words in all texts and in own
Amend code to allow multiple attachments
Hi I have a php page that allows the user to browse to a file (image) then sumbit, the confirmation page then has the following code which uploads the said file to the hosting server, but also appends
Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.we have to supply the function with number of entry needs to be inserted into the database and the work of the function is
str_replace help
Hey there,I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean up bad html to valid xhtml, I am using:Code: $pee = str_replace('&', '&amp;', $pee);It
Weekly Calendar
Hi, I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does anyone know of any examples or tutorails on how I can achieve this, as I have tried searching without
gmdate() - want 1 hr before time
Hi,I am using php gmdate(). Now I am entering all dates in my dbase using gmdate("Y-m-d H:i:s")I want 1 hr before datetime.So am using like gmdate("Y-m-d H:i:s",
how to easy edit text, with box? Help.
Hi.I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy for her as possible to edit the text. So, I am going to make a Admin site where she can login and then I