Documentation

Each version of PHT contains full PhpDoc, don't miss it when you search something, it's really useful.
On the site you will find some pieces of code to help you to start with PHT.

In order to use PHT you need PHP5 (recommanded >= 5.1.2) and cURL extension enabled. If you use old PHP5 (<5.1.2) you need PECL hash >= 1.1

What do you need to start?

To start developping a CHPP application with PHT you need your oauth consumer key and your oauth consumer secret. Be careful to never give or display your consumer secret !
If you don't have those informations, check your CHPP application page on Hattrick or ask to become a certified CHPP developper.

All examples of code are available from the left menu. If you have questions use comments at bottom of each page, contact form, Hattrick forum or even htmail.

 

Comments (Post yours)

  • By Samurai-BR the 20-05-2008

    Really very nice job.
    I will try here and when possible return on feedback.
    Congrats, on advance.
    [=
  • By destor77 the 23-05-2008

    excelente trabajo, espero mas ejemplos (sessiones, estadisticas, etc) para poder migrar mi aplicacion a esta herramienta.
    excellent work, I hope more examples (Session, statistics, etc.) to migrate my application to this tool.
  • By Peaso the 26-05-2008

    Very good job. I’ll try it to make my web using PHT.
    Thank you!
  • By destor77 the 26-05-2008

    excelent!!!!!
  • By arash the 24-06-2009

    hi
  • By portugal10 the 07-02-2010

    isto e muito fixe
  • By OR the 12-03-2010

    Hi,
    Is it possible to use this to find out how many minutes a player played in a match?
    Thanks,
    OR
  • By teles the 12-03-2010 teles Hattrick team

    Yes it’s possible. You have to parse matchs events, check if an event is a susbtitution event, then you got the minute and the player of this event.
    Look at HTMatch and HTEvent classes.
  • By david the 17-04-2010

    Thanks a lot, but could you say me what is ‘chppName’, ‘chppId’, ‘chppKey’
  • By teles the 17-04-2010 teles Hattrick team

    It’s your chpp application credentials given by Hattrick. If you don’t have one, as new chpp licence is closed right now, you can’t use PHT
  • By Adriano Moutinho the 08-11-2010

    Thank you very much for this amazing job.

    I found some minor mistakes on the code examples. missing and missing ; on line 21 of second example.

    Anyway, thanks for the development!
  • By teles the 08-11-2010 teles Hattrick team

    Thanks, examples are fixed :)
  • By HiseaSaw the 15-11-2010 HiseaSaw Hattrick team

    Thanks for sharing such a great work.

    Are these examples up-to-date?
    After login in HT I'm getting this error: oauth_problem=parameter_rejected&oauth_problem_advice=When%20obtaining%20a%20request%20token%2C%20you%20must%20not%20supply%20the%20oauth_token%20parameter
  • By teles the 15-11-2010 teles Hattrick team

    Yes examples are up to date.
    Error you got is strange, can you send me your piece of code?
  • By HiseaSaw the 15-11-2010 HiseaSaw Hattrick team

    I'm just using the first "Connection" example, no more code added (except of, obviously, consumer key, consumer secret and the request token url).

    I'm getting the error just after typing my credentials at Hattrick page (https://chpp.hattrick.org/oauth/authorize.aspx?oauth_token=[TOKEN]).

    Thank you again.
  • By HiseaSaw the 15-11-2010 HiseaSaw Hattrick team

    I fixed it, CallBackUrl was wrong ;-)
  • By teles the 15-11-2010 teles Hattrick team

    Of course you need a valid callback :p
    Nice it works for you :)
  • By fcheitenried the 16-11-2010

    Nice Tutorial....

    The Authorization works. But how is the code for an automatically login. I always get this error:
    oauth_problem=token_rejected&oauth_problem_advice=Supply%20a%20correct%20token

    When i get the autorization ther ist an token in the url and an security token. But how goes the automaticaly login.

    pls help

    thx a lot.
  • By teles the 16-11-2010 teles Hattrick team

    When you get the access token and the access token secret you can save it in your user's profile.
    Next time the user comes, you can set back this tokens to PHT and request xml.

    It's the third piece of code of this page: http://pht.htloto.org/documentation/connection.html
    In this example, tokens are set in $userToken and $userTokenSecret
  • By fcheitenried the 17-11-2010

    i got a webpage where i got a download-link (Code of the first step). when i click on it i can login via CHPP-Url. Then i get the token and tokenSecret via URL in my CALLBACK-URL.

    But now i want a "directly" link. I got the Tokens from last login.
    When i only put the code of the 3rd part it does not work.

    thx for ur help.
  • By teles the 17-11-2010 teles Hattrick team

    If you already got an access token, you don't need to redirect user to chpp login page.
    You just request xml files with these tokens set in PHT
    There is no direct link to authenticate user if you have his access token, access is already granted. (if token was not revoke by user on hattrick website)

    If it's doesn't help you, I didn't understood your problem, so you will have to explain it differently :)
  • By Orbix the 21-11-2010

    Hi,

    There is an error in function getHatStats() :

    return ($this->getMidfieldRating()

    instead of

    return ($this->getMiedfieldRating()

    Besides, when I call this line $match->getFirstHalfTime()

    I have this error : Undefined class constant 'SERVER_URL' (line 10245)

    thanks
  • By teles the 21-11-2010 teles Hattrick team

    Yes, 2 errors :(
    Will be fixed in next version, I do my best to publish it tomorrow
  • By teles the 22-11-2010 teles Hattrick team

    Errors are fixed in version 2.2, feel free to upgrade!
  • By alessandro the 24-11-2010 alessandro Hattrick team

    Hi teles, i ve some problem to understand how can i invoke the trainingdate function in my php script, could you help me please?
    Tanks
    Alessandro
  • By teles the 24-11-2010 teles Hattrick team

    I assume you talk about getTrainingDate() in HTWorldLeague class, then you can do it like this:

    $HT->getWorldDetails()->getLeagueById(5)->getTrainingDate();

    with "5" the id of the league you want

    You can also get it by requesting with getLeagueByCountryId() and a country id, or getLeagueByName() with an english name, getLeague() with a number according number of leagues returned in xml (get number with getTotalLeague())
  • By alessandro the 24-11-2010

    Perfect
    i was arrived at this (poor poor english) reading the hattrick api documentation but i get the wrong way using getleaguebyid('4'), but i saw in your PHT.php the class HTWorldLeague it's not possible use this?
    If is possible to contact you i'll be very happy.
    Thanks
  • By teles the 26-11-2010 teles Hattrick team

    I'm not sure I have understood you :) To use getTrainingDate() function you have to use HTWorldDetails class as I said before. Or what is your question?
  • By alessandro the 26-11-2010

    Yes i understand an i'm using $HT->getWorldDetails()->getLeagueById(5)->getTrainingDate();
    like u said, but i found in the your lib file (PHT.php) the class HTWorldLeague that seems to have trainingdate function .
    Alessandro
  • By alessandro the 02-12-2010

    HI teles

    it's me again, i'm upgrade to last versione and i'm trying
    to use getLastMatch() function in this way:

    $HT = $_SESSION['HT']
    $player = $HT->getPlayer('296383769')
    echo $player->getLastMatch()


    but i receive a fatal error
    Call to a member function hasChildNodes() on a non-object in PHT.php on line 9478

    Thanks
    Alessandro
  • By teles the 02-12-2010 teles Hattrick team

    getLastMatch() return an object, no bug this time ;)
  • By Riccardo the 22-12-2010

    Great! It's what I was looking for!!
  • By alessandro the 20-01-2011

    Hi teles my work is on test, but i put a link to your site cause i'm using your framework:
    http://www.modalitaprovvisoria.it/triplete/information.php

    Thanks a lot
    Alessandro
  • By teles the 22-01-2011 teles Hattrick team

    When it's done give me a logo, and I'll add your site on the homepage ;)
  • By alessandro the 24-01-2011

    Hi Teles here my site Banner:

    http://www.modalitaprovvisoria.it/triplete/banner.gif

    Thanks
    Alessandro
  • By alessandro1977 the 30-01-2011

    Hi teles is possibile to retrieve the matches played by my next opponent? i think to use $HT->getSeniorTeamArchiveMatches ()

    but i can't get my opponent ID

    Thank
    Alessandro1977
  • By Alessandro1977 the 30-01-2011

    Ok i retrieve opponent ID, now where i call $HT->getSeniorTeamArchiveMatches () how coul retrieve all match id ?

    Thank
    Alessandro
  • By teles the 05-02-2011 teles Hattrick team

    Hi
    You can do it like this:
    for($i=1; $i<=$list->getMatchNumber(); $i++)
    {
    $list->getMatch($i)->getId();
    //get others match info here
    }
  • By mogito the 15-02-2011 mogito Hattrick team

    Hello Teles,

    J'ai une petite erreur sur ma page de callback :

    "Fatal error: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "CHPPConnection" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in mypage.php on line 20"

    Une idée ?
  • By mogito the 15-02-2011

    C'est oki, j'ai trouvé l'erreur :p
  • By teles the 19-02-2011 teles Hattrick team

    Désolé pour la réponse tardive, tu as trouvé la solution, tant mieux, mais je vais la donner, ça peut servir à d'autres :)

    Le fichier PHT.php doit être inclus avant de récupérer l'objet en session, car si l'objet n'est pas connu par l'interpréteur avant qu'il soit chargé de la session, il ne peut pas être chargé correctement, d'où l'erreur :)
  • By me9mill the 28-02-2011 me9mill Hattrick team

    Thanks for creating PHT. :)
  • By Saxbar the 15-03-2011

    Bonsoir,
    Je ne comprends pas pourquoi le script suivant (inclu dans une class avec des fonctions) ne retourne rien... même pas une erreur...
    $this->HT = $_SESSION['HT'];
    $this->arenamystats = $this->HT->getMyArenaStats();
    $arenamystats->matchesnumber = $this->arenamystats->getMatchesNumber();

    J'ai essayé de placer des arguments dans getMyArenaStats(); comme la syntaxe le permet mais rien...

    Merci du coup de main ;)
  • By teles the 17-03-2011 teles Hattrick team

    Il y a un bug dans les stats du stats (en fait, il y a eu un changement du côté Hattrick (la doc montre un reste de ce qui est utilisé par PHT et qui ne fonctionne plus)), il va donc falloir attendre la prochaine version de PHT qui va corriger tout ça :)
    Merci pour la remontée !
  • By Saxbar the 18-03-2011

    De rien, j'ai remarqué une coquille dans l'orthographe de la variable weather, c'est peut être lié ?
    mixed $tomorrowWheaterId = null (line 5612)
  • By teles the 19-03-2011 teles Hattrick team

    Non, ce n'est pas lié, et le fait que le nom soit mal orthograpghié ne gêne pas :) Il se trouve que c'est une erreur dans la doc hattrick qui a entrainé une erreur dans pht, ça sera donc corrigé en 2.6
  • By Saxbar the 21-03-2011

    Bonjour Telesphore, j'espère que tu ne m'en voudras pas.
    HTRegion::getName() retourne l'ID de région. Le soucis se situe ligne 5639 ;) j'ai corrigé chez moi mais je te le dis pour la 2.6

    J'en profite pour te dire merci car ton boulot est formidable pour nous qui nous appuyons totalement dessus.
  • By teles the 23-03-2011 teles Hattrick team

    Effectivement, petite erreur :) Sera corrigé en2.6, merci !
  • By chew the 05-04-2011

    Hello, when I try to execute the first piece of code, it return an $url string without the oauth_token --->

    https://chpp.hattrick.org/oauth/authorize.aspx?oauth_token=

    So it gives me error.. I have put consumerkey and consumersecret correctly..Why is there this problem? :(
  • By teles the 06-04-2011 teles Hattrick team

    Can you set you error login to E_ALL and see if something generates an error?
  • By chew the 06-04-2011

    Hello teles and thanks for your answer.. I have set E_ALL..but it doesn't give me errors.. so I have tryied locally and it gives me the oauth_token correctly in the url...So I had a doubt..
    And I have discovered that the problem was that curl that hasn't the support for https.. So I have tryied in a hosting with curl and support https and it works!

    Thanks for all :)
  • By chew the 07-04-2011

    teles I have another question..and I promise that after this I'll disappear :)
    I see the third piece of code for connection and it's ok.. but i think that to save and reuse data, I have to link them to the user id..
    But How can I recover the user id of the user connected in hattrick? Is there a (chpp)link to recover this info or some function in PHT? Or is use of cookies needed?

    Thanks :)
  • By teles the 07-04-2011 teles Hattrick team

    To get userid: getClub()->getUserId()
    But, if you have no self auth system you won't be able to reuse the token (you have to know which user is the visitor, and without own authentication you can't know visitors then reuse token on future visits. You can use cookie but it's not a safe way)
    And you can come when you want, don't leave :)
  • By chew the 07-04-2011

    Thanks for hospitality teles.. and I want to congratulate you for your work... :)

    So have I to create a login on my site...? I thought that there was a way to take parameters of the connection/session of the user to the site of hattrick.. (I have seen some external site that shows status of the user on hattrick..if he's connected or not to hattrick.. but I don't know if it works..)
  • By Mark the 08-04-2011

    PHP Notice: Undefined variable: oauth_token in /srv/http/roba/psiutil/lib/PHT/PHT.php on line 193
    PHP Notice: Undefined variable: oauth_token_secret in /srv/http/roba/psiutil/lib/PHT/PHT.php on line 194

    why?
  • By teles the 08-04-2011 teles Hattrick team

    @chew: no, you don't need to have your own authentication, but in this case, each time a user come to your site he has to login to hattrick and you get a new oauth token. It's not a problem at all, but you don't use a token for more than one session, and at start it's not the goal of oauth, but there is no problem :)

    @Mark: Does oauth process works? After which function call do you get this notices?
  • By Mark the 09-04-2011

    I try to connect and get request token, but it's empty.
  • By chew the 09-04-2011

    @teles Thanks for answers teles :)

    @Mark: I don't know if your problem is similar to my old problem .. (read my message of 06-04-2011.. maybe is that the problem.. ) :)
  • By Mark the 09-04-2011

    @chew, yes It's the same problem.
    I try the script in a php-cli, how can I solve?
  • By Saxbar the 09-04-2011

    Salut Teles,
    Je viens de tomber là dessus (PHT 2.6) :
    Fatal error: Call to a member function getAttribute() on a non-object in /class/PHT.php on line 13320
    Si cela provient bien de la PHT, merci de me donner la correction car ca me bloque.
    Merci d'avance
    Saxbar
  • By Saxbar the 09-04-2011

    Re Salut Teles,
    Si tu pouvais regarder la fonction get433Experience(),
    je pense qu'il y a une coquille dans le code (343 au lieu de 433), elle ne retourne rien.
    Merci ;)
    Saxbar
  • By teles the 10-04-2011 teles Hattrick team

    Oui, bug sur get433Experience() et pour l'autre il doit aussi y avoir un bug, mais je n'arrive pas à avoir l'xml de la page en question, j'ai toujours un timeout :/ Dès que je trouve je publie une version de correction !
  • By Saxbar the 11-04-2011

    Cool,
    encore merci :)
  • By Saxbar the 19-04-2011

    Salut Thelesphore,
    Pour la 2.8, class HTLeagueTeam, getPositionChange(), coquilles sur les lignes 7298 à 7302.
    @+ Christophe
  • By Saxbar the 19-04-2011

    Re.
    Je ne comprends pas, getPositionChange() ne retourne rien.
  • By teles the 20-04-2011 teles Hattrick team

    Remplace la ligne 7284 par ça:
    $this->hasPostionChange = $this->getXml()->getElementsByTagName('PositionChange')->length > 0;
  • By Saxbar the 21-04-2011

    J'ai remplacé la ligne. La fonction isPositionChangeAvailable() retournait deja 1 de toute façon...
  • By Saxbar the 21-04-2011

    Cela ne fonctionne toujours pas. Mystère....
  • By Saxbar the 22-04-2011

    Cela fonctionne avec un autre profil hattrick que le mien, l'incident est clos. Merci bien !
  • By teles the 22-04-2011 teles Hattrick team

    Bizarre ça...
  • By Saxbar the 22-04-2011

    Pour ton info, maintenant, mon isPositionAvailable est à zéro, donc cela explique pourquoi je n'avais rien auparavant. Le pb venait donc bien de la ligne que tu as modifié. (pour ces réglages, ne pourrait-on pas échanger simplement par mail ? Je trouve ce formulaire un peu fastidieux à mon goût. Bref, sinon je pars en vacances, @ très bientôt !)
  • By teles the 22-04-2011 teles Hattrick team

    PHT a un forum sur Hattrick, tu peux aussi poser tes questions là bas ;)
    http://www.hattrick.org/Forum/Overview.aspx?v=0&f=765917
  • By Reelax the 07-05-2011

    Hello,

    Can someone tell me how to perform a connection to HT for our OWN team ? So if we already know our login and our secret password, what code should we use ?

    I mean if I want to create a website presenting my own team.

    Thanks
  • By teles the 07-05-2011 teles Hattrick team

    It's not allowed to develop a CHPP product for personnal needs. You should develop something to be used by the community
  • By eraser the 10-05-2011

    I've created a token from the webpage by using the oAuth test tool, but when trying the code from the last black box, i get "access is denied ..." error.

    How could i use the code from the last box? Where do i get the right token?

    Thanks
  • By teles the 11-05-2011 teles Hattrick team

    What do you mean for "last black box" ?
  • By josh the 17-05-2011

    hey there,
    maybe a noob question but where do i get those consumerKey and consumerSecret?

    Must i request them in hattrick via registering an app or how do i get this?

    Would be very pleasant if somebody can help a beginner :*-/
  • By teles the 17-05-2011 teles Hattrick team

    Hi, Yes, to get consumerKey and consumerSecret to use OAuth system you have to request and obtain a chpp lience for a product. First, accept developper licence agreement http://www.hattrick.org/Community/CHPP/ChppBecomingDeveloper.aspx , then ask a licence: http://www.hattrick.org/Community/CHPP/ChppApplyToCreateProgram.aspx
  • By Marius_J the 20-05-2011

    Hi teles! I am trying to connect CHPP to my web site - I'm developing a CHPP tool and I have the comsumer key and secret from OAuth. But, where do I put in this codes above? And what is the callbackurl? :)

    Thank you for answering! :)
  • By teles the 21-05-2011 teles Hattrick team

    You have to pass consumer data to CHPPConnection() function.
    The callback url is the url where the user will be redirected after login on Hattrick website, it must be an url on your site in which you will receive data for getting OAuth token.
  • By WouterT the 21-05-2011

    Hi Teles,
    Thanks for this great program, but I've got a question; is it also possible to just save the xml generated by hattrick on my webserver and do imports from that file?
    1. I've got a backup then.
    2. I can use data from those files for "stuff" I add later on.
    Thanks,
    Wouter
  • By Marius_J the 21-05-2011

    Thank you for quick answer :)

    I am using the website tool "Joomla!" to build my website. U am a beginner with this, and I don't understand how I request token ect.

    The codes above in the black boxes, where do I put them?

    Thank you,
    Marius_J
  • By teles the 21-05-2011 teles Hattrick team

    I don't know Joomla, so I can't help that much on it.
    You have to put this code somewhere in page, or module, ... which will do the chpp connection for your site.
  • By Marius_J the 22-05-2011

    I don't understand the discription on how to request token etc. or what I have to replace in the codes above...

    Could you please help me with a little description?

    Thank you,
    Marius_J
  • By teles the 25-05-2011 teles Hattrick team

    You have to get a "request token", then user has to authenticate on hattrick website, and when user returns to your site you have to get a "access token", this token is a valid token to get xml files.
  • By leroutard the 28-06-2011

    Hello,
    I want to know if we can get all team from a leagueId ( poule en français) ?
    If yes, which class handle this ? ( I can't find it )

    Thanks

  • By teles the 28-06-2011 teles Hattrick team

    No, there is no easy way to get all teams from a specific league.
    You can search league with search xml file, yu got leagueUnitId, then with league xml file you can find team of this league.
  • By leroutard the 28-06-2011

    Ok , thanks for the quick answer !
  • By mrbrown79 the 26-07-2011

    Hi Teles,

    Great tool.

    Do you have an overview of the memory usage of PHT?

    In the code skeleton below, I try to get the player data from a large amount of leagues. At some point, I get a memory exhausted error. So my theory is that the memory usage accumulates for each TeamPlayers lookup.

    Any comments on this theory?

    $HT = new CHPPConnection('mSoqGeWBwLGPPCCKHLDwwT', 'xx','xx'');
    $HT->setOauthToken($userToken);
    $HT->setOauthTokenSecret($userTokenSecret);

    for($leagueId=$firstLeague;$leagueIdgetLeague($leagueId);

    for($i=1; $igetTeam($i);
    $leagueTeamId = $leagueTeam->getTeamId();
    $players = $HT->getTeamPlayers($leagueTeamId);
    for($j=1; $jgetNumberPlayers(); $j++)
    {
    $player = $players->getPlayer($j);
    $name = addslashes($player->getName());
    $age = $player->getAge();
    $salary = $player->getSalary() ;
    $stamina = $player->getStamina();
    $tsi = $player->getTsi() ;
    $exp = $player->getExperience() ;
    $id = $player->getId() ;
    sql_insert(); // defined elsewhere
    }
    }
    }
  • By mrbrown79 the 26-07-2011

    Hmm. My last post was corrupted to some degree apparantly due to close-to-html tags.

    Anyway, the code is three nested for loops.

    1st running through leagues
    2nd running through teams (of each league)
    3rd running through players (of each team)

    All is done on the same CHPPConnection.

    Do you think, the memory usage of each player lookup will accumulate in such a case?
  • By teles the 26-07-2011 teles Hattrick team

    Yes of course :) After each loop, clear PHT cache according to what you called, you will decrease memory used
  • By mrbrown79 the 27-07-2011

    OK. I'm not experienced into object-oriented PHP programming. Can you exemplify how I could clear the cache? Is it just to re-instantiate the CHPPConnection?

    As the process of data collection is pretty time-consuming, I want it to be (close to) optimal with reference to processing time. Please, let me know if you have any tricks in regards to this :)
  • By teles the 27-07-2011 teles Hattrick team

    After the for loop for getTeamPlayers()
    you can call $HT->clearTeamPlayers($leagueTeamId);

    When you call getTeam($id), after you get all you want you can call clearTeam($id)

    It will clear pht cache (there is a cache on each xml file) and then you will consume less memory
  • By halftime the 10-08-2011

    "Notice: Trying to get property of non-object in
    ../trunk/PHT.php on line 13477"

    function: $player->getRatingStarsAtEndOfMatch();
  • By guillermo the 22-10-2011

    hi teles, this looks rly nice!

    I have a nab doubt, when u say that we can save user token u mean on acutal session or in a db?

    if its on db, when the user puts login i can manage the conecction to his team without doing 1st step?

    i dont rly undertand steps. 1st one i give my chpp credentials and a url for users, they log in on hattrick and i get a request with their oauth_token and oauth_verifier.
    retrieveAccessToken method is to validate that ? and after that i can store that access data in a db?
  • By teles the 26-10-2011 teles Hattrick team

    Hi,
    Yes, retrieveAccessToken is to validate the token and give you real access to user data.
    When you got the final token, you can save it to reuse later and avoid firsts login steps.
  • By Thomas the 16-11-2011

    Got the following error:

    Fatal error: Call to undefined method HTTeam::getNumberFlagsHome()

    I used the above example...
  • By Hoedinie the 22-11-2011 Hoedinie Hattrick team

    Can anyone help me on how to get the userToken and userTokensecret. I am trying to store it in a local xml file so the administrative tasks can use my own account.
  • By teles the 08-01-2012 teles Hattrick team

    Thomas, you have to use getTeamFlags() function in order to have a HTTeamFlags object and not a HTTeam object
  • By teles the 08-01-2012 teles Hattrick team

    Hoedinie, have you read this doc: http://pht.htloto.org/documentation/connection.html
    When you retrieve the token in last step, you can save it on your side, as you want, and reuse it without doing whole auth process.
  • By Mark the 13-01-2012

    I can get the season and the current week? If yes, which is the method that can do this?
  • By teles the 20-01-2012 teles Hattrick team

    You can get current season with getLeagueSeason() function if you don't provide second parameter.
    There is no easy way to get current week, you have to test if week match is played or not.
  • By fcheitenried the 06-03-2012

    Nice Tutorial... One thing i still need..... How can i fetch the LeagueData...
    Want to have the whole table... how to do this...

  • By teles the 12-03-2012 teles Hattrick team

    With getLeague() you can get league info, then browse 8 teams and get score
  • By fcheitenried the 22-03-2012

    Didn't work.. maybe im too stupid.....
    i tried with:
    $HT->getLeague()->getLeagueTeam('1')->getPoints();
    also tried with:
    $HT->getLeague()->getLeagueTeam()->getTeam('1')->getPoints();


    i wantet to have the points of the Team at first position. Do i am completly Wrong.

    pls help
  • By teles the 12-04-2012 teles Hattrick team

    Sorry for the delay of my answer
    You have to do: $HT->getLeague()->getTeam(1)->getPoints();

Add your comment