If you need to get an attachment ID from the source URL, use this function.
How to pull the first image from a post in Wordpress using PHP.
How to exclude certain categories from your Wordpress blog’s RSS feed. Also, a note on Google Reader
I’ve introduced Wordpress to my website.