Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.