I would like to create a Script that pulls some Infomation from an Inputed URL, and Put the pulled Information into Text boxes. Here is the page with the Info I want <tr> <td>Wanter1: Yes</td> //This will be Yes or No.. </tr> <tr> <td>Wanted2: 211</td>//This will be a 1-3Digit Number </tr> <tr> <td>Notwanted: 354906</td>//This I want Ignored </tr> <tr> <td>Wanted3: 243</td>//This will be a 1-3Digit Number </tr> <tr> <td>Wanted4: 216</td>//This will be a 1-3Digit Number </tr> <tr> <td>Wanted5: 142</td>//This will be a 1-3Digit Number </tr> <tr> <td>Wanted6: 103</td>//This will be a 1-3Digit Number </tr> <tr> <td>Wanted7: 111</td>//This will be a 1-3Digit Number </tr> HTML: Would there be anyways to pull that specific Information? I don't want the "Wanted1:" Part, Just the rest.. If you can help me with this, But need more Infomation, Please PM me.
Site Content are <b> <? print file_get_contents("http://www.apitalk.com"); ?> </b> HTML: I hope it helps
What about something like this:- <?php // The URL of the page $sUrl = ''; // Read the source code $sSource = file_get_contents($sUrl); // Match the pattern "<td>...: ...</td>" preg_match_all('/<td>([^:]+):\s([^<]+)<\/td>/', $sSource, $aData); // Structure data $aInfo = array(); foreach($aData[1] as $iKey => $sKey) { $aInfo[$sKey] = $aData[2][$iKey]; } // Output information extracted print_r($aInfo); /* Array ( [Wanter1] => Yes [Wanted2] => 211 [Notwanted] => 354906 [Wanted3] => 243 [Wanted4] => 216 [Wanted5] => 142 [Wanted6] => 103 [Wanted7] => 111 ) */ ?> PHP: