Fetching Thumbnails – Easily Solved PHP Hack, Need Help!
-
function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); $first_img = $matches [1] [0]; if(empty($first_img)){ //Defines a default image $first_img = "URLOFIMAGE"; } return $first_img; }
Here is what I use to fetch thumbnails. Instead of fetching a default image (URLOFIMAGE) I would like it to fetch absolutely nothing! Any help?
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Fetching Thumbnails – Easily Solved PHP Hack, Need Help!’ is closed to new replies.