note 117396 rejected from imagick.resizeimage by cmb

From: Date: Wed, 03 Jun 2015 11:05:24 +0000
Subject: note 117396 rejected from imagick.resizeimage by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-202734@lists.php.net to get a copy of this message
Note Submitter: murad1gemr at gmail dot com ---- can you chang my code to be resizing the photo that I upload it to the server and make the dimensions automaticly 250px * 250px because I want to make it showing in facebook please . please if you can chang this code not give me another code becuase I am not experienced in php this is my code : <?php /* photo uploader*/ if($_POST["submit"]){ $pic = trim($_POST["pic_url"]); if($pic){ $photo = fopen($pic,"rb"); if($photo){ $valid_exts = array("jpg","jpeg","gif","png","Bmp","TIFF"); // default image only extensions if($valid_exts){ $newpic = fopen("../../cat/action/images/" . basename($pic), "wb"); // replace "downloads" with whatever directory you wish. if($newpic){ while(!feof($photo)){ // Write the url file to the directory. fwrite($newpic,fread($photo,1024 * 8),1024 * 8); // write the file to the new directory at a rate of 8kb/sec. until we reach the end. } } } } } } ?>

« previous php.notes (#202734) next »