Subpage under development, new version coming soon!
Subject: PHP
I already can login and download data...
But now I would like to make a page that shows the ranks of the belgian teams...
That doesn't work though...
I wrote a switch, but I have to add all the data together and then extract whatever I need... Only I don't know how to add the data together :s
(edited)
But now I would like to make a page that shows the ranks of the belgian teams...
That doesn't work though...
I wrote a switch, but I have to add all the data together and then extract whatever I need... Only I don't know how to add the data together :s
(edited)
u need something like this?
function parseLeaguePage(&$page) {
$data = array();
$page = strstr($page,'');
//$data['info']['leagueID'] = getAttrib($page, 'leagueID');
//$data['info']['name'] = getAttrib($page, 'name');
//$data['info']['countryID'] = getAttrib($page, 'countryID');
//$data['info']['division'] = getAttrib($page, 'division');
$data['info']['round'] = getAttrib($page, 'round');
$data['info']['season'] = getAttrib($page, 'season');
//$data['info']['type'] = getAttrib($page, 'type');
//$data['info']['isOfficial'] = getAttrib($page, 'isOfficial');
//$data['info']['isCup'] = getAttrib($page, 'isCup');
//$data['info']['userID'] = getAttrib($page, 'userID');
$page = strstr($page,'');
$data['teams'] = array();
while ($page = strstr($page, '')) {
$team = array();
$team['teamID'] = getAttrib($page, 'teamID');
//$team['round'] = getAttrib($page, 'round');
$team['points'] = getAttrib($page, 'points');
$team['wins'] = getAttrib($page, 'wins');
$team['draws'] = getAttrib($page, 'draws');
$team['losses'] = getAttrib($page, 'losses');
$team['goalsScored'] = getAttrib($page, 'goalsScored');
$team['goalsLost'] = getAttrib($page, 'goalsLost');
$team['rankTotal'] = getAttrib($page, 'rankTotal');
$data['teams'][$team['teamID']] = $team;
unset($team);
}
return $data;
}
function getAttrib(&$page, $name, $whole = true) {
$out = '';
if ($whole) {
$page = strstr($page,'');
}
else {
$page = strstr($page,'
ehm, i cant post the code, cause some things are filtered.
(edited)
function parseLeaguePage(&$page) {
$data = array();
$page = strstr($page,'');
//$data['info']['leagueID'] = getAttrib($page, 'leagueID');
//$data['info']['name'] = getAttrib($page, 'name');
//$data['info']['countryID'] = getAttrib($page, 'countryID');
//$data['info']['division'] = getAttrib($page, 'division');
$data['info']['round'] = getAttrib($page, 'round');
$data['info']['season'] = getAttrib($page, 'season');
//$data['info']['type'] = getAttrib($page, 'type');
//$data['info']['isOfficial'] = getAttrib($page, 'isOfficial');
//$data['info']['isCup'] = getAttrib($page, 'isCup');
//$data['info']['userID'] = getAttrib($page, 'userID');
$page = strstr($page,'');
$data['teams'] = array();
while ($page = strstr($page, '')) {
$team = array();
$team['teamID'] = getAttrib($page, 'teamID');
//$team['round'] = getAttrib($page, 'round');
$team['points'] = getAttrib($page, 'points');
$team['wins'] = getAttrib($page, 'wins');
$team['draws'] = getAttrib($page, 'draws');
$team['losses'] = getAttrib($page, 'losses');
$team['goalsScored'] = getAttrib($page, 'goalsScored');
$team['goalsLost'] = getAttrib($page, 'goalsLost');
$team['rankTotal'] = getAttrib($page, 'rankTotal');
$data['teams'][$team['teamID']] = $team;
unset($team);
}
return $data;
}
function getAttrib(&$page, $name, $whole = true) {
$out = '';
if ($whole) {
$page = strstr($page,'');
}
else {
$page = strstr($page,'
ehm, i cant post the code, cause some things are filtered.
(edited)
That'll be for later :) But is usefull... I first need to get all the xml...
hm, whats the problem then. if you can get one, then you can get all or not? :-)
Yes, I could... But it would take lots of time... A I have to get everything everything seperatly...
I'm gonna send you my script otherwise... You can see then ;) Send me your email via SK-mail otherwise ;)
I'm gonna send you my script otherwise... You can see then ;) Send me your email via SK-mail otherwise ;)