olli460 Posted October 8, 2009 Share Posted October 8, 2009 Hello, Im trying to create a database of games and found a site that already has it, So im trying to grab the name of a game based on what i type, Here is what ive currently got: <?php if($_POST['r_name']) { $lines = file_get_contents("http://www.ds-scene.net/?s=releases&s2=2&o=a&f8=$_POST[r_name]"); preg_match("|<td class=\"romlistpad\"><div align=\"left\" class=\"romlistTxt\"><a href=\"/(.*?)\" title=\"(.*?) \"><b>(.*?)</b></a><br /><span class=|s", $lines, $name); $gamename = $name[3]; echo $gamename; } ?> It grabs the name fine however it only grabs one, How can i make it get several names with one search? Link to comment https://forums.phpfreaks.com/topic/176945-grabbing-list-of-text/ Share on other sites More sharing options...
cags Posted October 8, 2009 Share Posted October 8, 2009 preg_match_all would be a good start. Link to comment https://forums.phpfreaks.com/topic/176945-grabbing-list-of-text/#findComment-932934 Share on other sites More sharing options...
.josh Posted October 8, 2009 Share Posted October 8, 2009 content stealers make pandas sad. Link to comment https://forums.phpfreaks.com/topic/176945-grabbing-list-of-text/#findComment-933001 Share on other sites More sharing options...
MatthewJ Posted October 8, 2009 Share Posted October 8, 2009 content stealers make pandas sad. Agreed! Link to comment https://forums.phpfreaks.com/topic/176945-grabbing-list-of-text/#findComment-933003 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.