thanks for the quick reply. I'm trying to grab Maxim Online's daily girl image on [a href=\"http://maximonline.com/todays_girl/\" target=\"_blank\"]http://maximonline.com/todays_girl/[/a]. They put the daily image in a [a href=\"http://maximonline.com/todays_girl/girls/\" target=\"_blank\"]http://maximonline.com/todays_girl/girls/[/a] directory. Example: [a href=\"http://maximonline.com/todays_girl/girls/rachel_nichols/gfd_med.jpg\" target=\"_blank\"]http://maximonline.com/todays_girl/girls/r...ols/gfd_med.jpg[/a] So basically, I want my script to look at [a href=\"http://maximonline.com/todays_girl\" target=\"_blank\"]http://maximonline.com/todays_girl[/a] source and grab: [code] <img src="/todays_girl/girls/rachel_nichols/gfd_med.jpg" [/code] and print out the image on my webpage. Go ahead and test the code yourself: [code] <?php // Fetch webpage $url = file_get_contents('http://maximonline.com/todays_girl/'); // Look for this image: <img src="/todays_girl/girls/*/*.jpg" preg_match('#(?<=<img src="/todays_image/girls/).+\.jpg(?=">)#i', $url, $matches); $file = $matches[1]; echo ' <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <img src="http://maximonline.com/todays_girl/girls/$file"> </head> </html>'; ?> [/code]