Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = 'http://oceanseven.in/O7/xx/';
- $fgc = file_get_contents($url);
- if(preg_match_all('/<a\s+href=["\']([^"\']+)["\']/i', $fgc, $links, PREG_PATTERN_ORDER)) {
- $all_hrefs = array_unique($links[1]);
- if(!empty($all_hrefs)) {
- $num = 1;
- foreach($all_hrefs as $v_href) {
- if($num <= 10) {
- if(strpos($v_href, '.jpg') !== false) {
- file_put_contents($v_href, file_get_contents($url . '/' . $v_href));
- }
- }
- $num++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement