Free for PREMIUM members
Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium
Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
<?php // RAY_temp_gallitin.php
// READ THE FOREIGN PAGE
$htm = file_get_contents('http://www.caught.com/index/sexy-and-funny-gallery-xxiv/');
// SCRAPE THE PAGE DATA WITH THESE KEY ELEMENTS
$dlm1 = "<div id='gallery-1'";
$dlm2 = "<br style='clear: both;' />";
$dlm3 = '<img ';
// REMOVE FRONT AND BACK OF HTML
$arr = explode($dlm1, $htm);
$htm = $dlm1 . $arr;
$arr = explode($dlm2, $htm);
$htm = $arr;
// REMOVE WHITESPACE AND COMPRESS
$str = preg_replace('/\s\s+/', ' ', $htm);
// CREATE AN ITERATOR
$new = array();
$arr = explode($dlm3, $str);
foreach ($arr as $thing)
// IMAGE TAGS HAVE WIDTH IN A CONSISTENT PLACE
if (substr($thing,0,3) != 'wid') continue;
// REMOVE EXTRANEOUS STUFF - SAVE THE IMAGE URL
$poz = strpos($thing, '>');
$thing = substr($thing, 0, $poz+1);
$new = $dlm3 . $thing;
// SHOW THE WORK PRODUCT
Open in new window
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.
Join & Ask a Question
Join our community for more solutions or to ask questions.
For immediate help use Live now!