Screen Scraping with php

From: Date: Fri, 08 Jul 2005 01:43:08 +0000
Subject: Screen Scraping with php
Groups: php.general 
Request: Send a blank email to php-general+get-218327@lists.php.net to get a copy of this message
I am trying to use php to pull an url out of an html page.... If I have an html page that is being 'fread' and the html source contains the below.... and, I want to get the image: http://image.com.com/gamespot/images/2005/132/914653_20050513_screen006.jpg <!--************ END SCREENSHOT NAVIGATION ************--><span class="spacer6"> </span><br><div class="scaption"><img src="http://image.com.com/gamespot/images/2005/132/914653_20050513_screen006.jpg" border="0" How would I parse the html page and get the image url ? Is this an eregi kind of thing or is there some easier way ? this is the sample page I want to parse: http://www.gamespot.com/pc/rpg/guildwars/screens.html?page=264 would I search for the string ,<!--************ END SCREENSHOT NAVIGATION ************-->, and then search for the first occurence of
<img src =     ?
any help is appreciated :) g

« previous php.general (#218327) next »