|
رفع صورة الى الموقع عن طريق رابط
السلام عليكم
أريد طريقة أستطيع بواسطتها رفع صورة من رابط الى موقعي مثل remote upload
1 إجابة
يمكنك عمل هذا
copy('http://www.remotewebsite.com/image.jgp','data/image.jpg'); ولكنها تحتاح allow_url_fopen ان تكون مفتوحة
او يمكنك استعمال هذه الطريقة//remote image to copy
$remoteImageURL = 'http://www.website.com/image.jpg';
//local directory to store image
$dir_path = '/images/';
if($remoteImageURL){
require_once('class.get.image.php');
// initialize the class
$image = new GetImage;
// just an image URL
$image->source = $remoteImageURL;
$image->save_to = $dir_path; // with trailing slash at the end
$get = $image->download('curl'); // using cURL
$pic = $dir_path.basename($remoteImageURL);
//you can use the picture path e.g. Insert into DB from this variable $pic والكلاس المستعمل فى المرفقات ويمكنك ايضا قراءة هذه المقالة PHP: How to Download a Remote Image using GD or cURL
بواسطة: molhm 1 من 1 أشخاص وجدو هذه الاجابة مفيدة. هل وجدتها؟ نعم لا يظهر لي هذه الخاصية لن تعمل فى وجود السيف مود اون .. فهى خاصة بتتبع الرابط |

