note 117396 added to imagick.resizeimage
| From: | murad1gemr at gmail dot com | Date: | Wed, 03 Jun 2015 10:32:00 +0000 |
| Subject: | note 117396 added to imagick.resizeimage | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202730@lists.php.net to get a copy of this message | ||
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.
}
}
}
}
}
}
?>
----
Server IP: 72.52.91.14
Probable Submitter: 185.11.11.90
----
Manual Page -- http://php.net/manual/en/imagick.resizeimage.php
Edit -- https://master.php.net/note/edit/117396
Del: integrated -- https://master.php.net/note/delete/117396/integrated
Del: useless -- https://master.php.net/note/delete/117396/useless
Del: bad code -- https://master.php.net/note/delete/117396/bad+code
Del: spam -- https://master.php.net/note/delete/117396/spam
Del: non-english -- https://master.php.net/note/delete/117396/non-english
Del: in docs -- https://master.php.net/note/delete/117396/in+docs
Del: other reasons-- https://master.php.net/note/delete/117396
Reject -- https://master.php.net/note/reject/117396
Search -- https://master.php.net/manage/user-notes.php