im using most of your code now
<title>Runescape Stats</title>
<?php
$xx = "http://services.runescape.com/m=hiscore/hiscorepersonal.ws?user1=Evultoad";
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, $xx);
curl_setopt($cURL, CURLOPT_HEADER,0);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cURL, CURLOPT_COOKIESESSION, true);
curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, 1);
$strPage = curl_exec($cURL);
curl_close($cURL);
//we want inside parentes, which is between two <tr> tags
$pattern1 = '#<tr class="row rowp1">(.+)</tr>#Us';
if( preg_match($pattern1, $strPage, $match) ){
$catch = str_replace(array("\r\n","\n"),'',$match[1]);
echo '<table border="1"><tr>';
echo 'Evultoads Stats';
echo '</tr></table>';
}else{
echo 'Could not find catch';
}
//we want what is inside the parentes, which is between two <td> tags
$pattern2 = '#<td.*>(.+)</td>#Us';
if( preg_match_all($pattern2, $catch, $result) ){
$cell = $result[1];
echo '<pre>';
print_r($cell);
}else{
echo 'Could not make cells';
}
?>
and im getting a return of
Evultoads Stats
Array
(
[0] =>
[1] => Overall
[2] => 170,732
[3] => 1,732
[4] => 49,722,144
)
how can i get it so it replaces the above with something like
<table width="200" border="0">
<tr>
<td> </td>
<td>Skills</td>
<td>Rank</td>
<td>Level</td>
<td>XP</td>
</tr>
<tr>
<td><img></td>
<td>Overall</td>
<td>170,732</td>
<td>1,732</td>
<td>49,722,144</td>
</tr>
</table>
where
<td>170,732</td>
<td>1,732</td>
<td>49,722,144</td>
are getting pulled from the website, as they are the only three cells i need from there as the rest can be local