[PHP] How can i download 32000 images from another server to my server
Hello, i tried to download 32000 images from another to my server, through the code, $conn_id = ftp_connect("$ftp_server"); $login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass"); if ((!$conn_id) || (!$login_result)) { echo "Ftp connection has failed!"; echo "Attempted to connect to $ftp_server for user $user"; die; } else { echo "Connected to $ftp_server, for user $user"; } $arr = ftp_nlist ($conn_id, "."); for($i=0;$i<=sizeof($arr); ++$i) { $dir_first = substr($arr[$i],0,1); $dir_second = substr($arr[$i],0,2); $target_name = strtolower($arr[$i]); $upload = ftp_get($conn_id, "../images/photos/$dir_first/$dir_second/$target_name", "$arr[$i]", FTP_BINARY); } } } if (!$upload) { echo "Ftp upload has failed!"; } else { echo "Uploaded source_file to $ftp_server as destination_file"; } ftp_quit($conn_id); the file names are from 4_0.jpg,4_1.jpg,41000_0.jpg...49000_0.jpg etc 5_0.jpg,5_1.jpg,51000_0.jpg...59000_0.jpg all files starting 4_0.jpg will download to ../images/photos/4/40/4_0.jpg all files starting 41000_0.jpg will download to ../images/photos/4/41/4_0.jpg .. all files starting 5_0.jpg will download to ../images/photos/5/50/4_0.jpg all files starting 51000_0.jpg will download to ../images/photos/5/51/4_0.jpg is any better method than above the problem is that all afiles aare not downloading, then showing the message cannot find server in IE. around 1 files downloaded. any body please solve this _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] download 32000 images another server server
Hello, i tried to download 32000 images from another to my server, through the code, $conn_id = ftp_connect("$ftp_server"); $login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass"); if ((!$conn_id) || (!$login_result)) { echo "Ftp connection has failed!"; echo "Attempted to connect to $ftp_server for user $user"; die; } else { echo "Connected to $ftp_server, for user $user"; } $arr = ftp_nlist ($conn_id, "."); for($i=0;$i<=sizeof($arr); ++$i) { $dir_first = substr($arr[$i],0,1); $dir_second = substr($arr[$i],0,2); $target_name = strtolower($arr[$i]); $upload = ftp_get($conn_id, "../images/photos/$dir_first/$dir_second/$target_name", "$arr[$i]", FTP_BINARY); } } } if (!$upload) { echo "Ftp upload has failed!"; } else { echo "Uploaded source_file to $ftp_server as destination_file"; } ftp_quit($conn_id); the file names are from 4_0.jpg,4_1.jpg,41000_0.jpg...49000_0.jpg etc 5_0.jpg,5_1.jpg,51000_0.jpg...59000_0.jpg all files starting 4_0.jpg will download to ../images/photos/4/40/4_0.jpg all files starting 41000_0.jpg will download to ../images/photos/4/41/4_0.jpg .. all files starting 5_0.jpg will download to ../images/photos/5/50/4_0.jpg all files starting 51000_0.jpg will download to ../images/photos/5/51/4_0.jpg is any better method than above the problem is that all afiles aare not downloading, then showing the message cannot find server in IE. around 1 files downloaded. any body please solve this _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how could i resize image in PHP
hello, how clud i resize images im php with the , is the script below rezize it if it work where shuld i place this script? can i give relate path for the jpg file? is it need to place this script in a php file call this in the please help Header("Content-type: image/jpeg"); // $size and $string are passed from the URL //$font = "/home/joel/public_html/ARIALBD.TTF"; // load the font $im = imagecreatefromjpeg("../images/6/62/621345_0.jpg"); // create the source image from jpeg file if(ImageSX($im) > ImageSY($im)) // image is wider than it is tall { $width = $size; $height = $width * (ImageSY($im) / ImageSX($im)); } else // image is taller than it is wide, or both dimensions are the same { $height = $size; $width = $height * (ImageSX($im) / ImageSY($im)); } $im2=ImageCreate($width, $height); // create the destination image, with the correct dimensions $white = ImageColorAllocate ($im2, 255, 255, 255); // allocate a white color $black = ImageColorAllocate ($im2, 0, 0, 0); // allocate a black color imagecopyresized($im2, $im, 0,0,0,0, $width, $height, ImageSX($im), ImageSY($im)); // do the resizing //$text_size = ImageTTFBBox(12, 0, $font, $string); //ImageTTFText ($im2, 12, 0, $width - 6 - $text_size[4], $height - 6 - $text_size[1], $white, $font, $string); Imagejpeg($im2,'', 75); // display the new, resized image ImageDestroy($im); ImageDestroy($im2); regards vishak _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] About php
Hello, I have a doubt about multi select from drop down, if i set it as then how could I check it for javascript validation. for this select, If any alternative for this please inform me. Vishak Get free email and a permanent address at http://www.netaddress.com/?N=1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem in retreving values from more than one multi select in form
Hello all, I have a problem with the multi select, any body please solve this. In a form there are more than one multi select box, arranged one by one. Following are the way i created it. Vishak Sujith Rajesh Vishak Sujith Rajesh How coud i get the values of the multi select when I submitted this form. For the text area i had taken the values by $user[0], $user[1] etc. and I got values 'user1', 'user2' etc. And the problem is how could i get the values of multi select, I tried it with $mselect[0],$mselect[1] then I got the last selectd values of the bottom select box. What I want is, If I selected 2 names from first mselect and 2 from second mselect, then the values must get in the manner, first and second name of first select then first and second name of second select Regards Vishak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]