<?php
function base64_to_jpeg($base64_string, $output_file) {
// open the output file for writing
$ifp = fopen( $output_file, 'wb' );
// split the string on commas
// $data[ 0 ] == "data:image/png;base64"
// $data[ 1 ] == <actual base64 string>
$data = explode( ',', $base64_string );
// we could add validation here with ensuring count( $data ) > 1
fwrite( $ifp, base64_decode( $data[ 1 ] ) );
// clean up the file resource
fclose( $ifp );
return $output_file;
}
$file=file_get_contents("http://www.elele.com.tr/guzellik/makyaj/makyaj-hileleri");
preg_match_all('/<br><br><img src="(.*?)"/i',$file,$image);
foreach($image as $base){
$name = md5(rand()).".jpg";
base64_to_jpeg($base, $name);
}
Guzel fonksiyon olmus

))
ASUS_Z002 cihazımdan Tapatalk kullanılarak gönderildi