<?php
function catch_that_imageurl() {
    global $post, $posts;
    ob_start();
    ob_end_clean();
    preg_match('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matche);
    if($matche[1])
        return $matche[1];
    return 'http://img.psy.co/psychology.jpg';
}
?>