Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_img($imgs, $thumbs, $preview){
- $ch = curl_init($imgs);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
- $raw = curl_exec($ch);
- curl_close($ch);
- foreach ($thumbs as $thumb){
- $saveto1 = $thumb;
- $fp = fopen($saveto1, 'w');
- fwrite($fp, $raw);
- fclose($fp);
- }
- foreach ($preview as $prev){
- $saveto2 = $prev;
- $fp2 = fopen($saveto2, 'w');
- fwrite($fp2, $raw);
- fclose($fp2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement