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? Quote 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. Quote 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. Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/176945-grabbing-list-of-text/#findComment-933003 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.