Azərbaycan dili Bahasa Indonesia Bosanski Català Čeština Dansk Deutsch Eesti English Español Français Galego Hrvatski Italiano Latviešu Lietuvių Magyar Malti Mакедонски Nederlands Norsk Polski Português Português BR Românã Slovenčina Srpski Suomi Svenska Tiếng Việt Türkçe Ελληνικά Български Русский Українська Հայերեն ქართული ენა 中文
Subpage under development, new version coming soon!

Subject: PHP

2008-02-05 18:59:10
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)
2008-02-05 19:46:20
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)
2008-02-05 22:25:59
That'll be for later :) But is usefull... I first need to get all the xml...
2008-02-05 22:54:18
hm, whats the problem then. if you can get one, then you can get all or not? :-)
2008-02-06 09:55:12
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 ;)
2010-10-14 18:14:47
how can I make this to work? :(




(edited)
2010-10-14 21:12:08
Message deleted

2010-10-30 16:54:11
is here any good php programmer to help me?
2010-10-31 00:15:02
What is your problem?