View Full Version : CHPP - PHP Help needed
All the functions I submitted are CHPP approved => means I can start working. I am using PHP (on a free website hosting I have limited technologies choice). I posted in the CHPP conferences too and a guy gave my the following code to login into Hattrick => but that doesn't work for me.
Edit : PHP code removed becuase of bad formatting
Any developpoers here. Mr Wednesday. indoorsoccersim ?
dola
Nevermind - I figured it myself - Working on a French Hatstats type of site
Mr. Wednesday
02-01-2004, 12:13 PM
I'm a dev, but I know nothing about php. I'm a VB/C++/Fortran man myself.
GoldenEagle
02-01-2004, 12:52 PM
I can help you with PHP Alf. Just let me know what you need.
I can help you with PHP Alf. Just let me know what you need.
Thanks. I now manage to login, get the pages I want from Hattrick. Now I need some XML parsing help. I just haven't had time to look at the documentation yet. Thanks for your proposal GE.
Mr Wednesday. No worries ! I might contact you for matchdetails help ;)
Coffee Warlord
02-01-2004, 02:48 PM
Lord. Who wrote that code? BAD! BAD BAD BAD!
What exactly are you trying to accomplish? Should be fairly simplistic for me to help.
CW : I am using the Pear HTTP Client to log into Hattrick in order to retrieve XML files in order to do a "French" Hatstats type of site. And the code on the first post is not working => $HTClient->_responses is an Array => little bit modified code is working.
Coffee Warlord
02-02-2004, 10:03 AM
Hmm, how to offer decent aid.
Tell you what, send me an email addy I can send to, and I'll ship you a bunch of examples of XML parsers I've written. I'll add some notes to it, and so forth. That'd prolly be the most help.
CW : Thanks very much. I'll prepare an email.
I am currently running through php.net manual pages and the related examples, and that is already plenty helpful !
MacroGuru
02-03-2004, 10:41 AM
Sorry Alf,
I would hop in and help, but alas, my skills right now are .NET, ASP, minor PHP, and minor XML.
However, I am trying to pick up XML better as I am needing it for the matchviewer I am working on in Flash.
Update : I manage to log in. Get XML files. Parse them into PHP arrays. Now I need to work on the MySQL databse design.
Dola - A little update on where I am with this.
- HT Login is working (not very clean I guess, but working anyway)
- I manage to get leaguedetails.asp XML files (your series page) and put the results in an array
- I created my SQL database (for now only 2 tables => 1 for teams, 1 for leagues)
- I have managed to update info on Division I to V in French league (D VI has 1024 series and as the design is not finished yet, I'll see this later)
- Trying to make "intelligent" SQL queries to sort data
Early conclusions:
- For those of you with an average programming background (like me), PHP+MySQL is a real killer solution.
- There are bloody teams using various special characters in their team names : [#`'$*²°°³-_. and so on. Makes the mysql_real_escape_string a must.
Coffee Warlord : As you see, so far I managed to do it myself, however, I would like to submit you my PHP code for hints on improvments.
fantastic flying froggies
02-06-2004, 03:50 AM
Go go Alfie go !
I can't help you with the programming, but you have all my support ... :)
I have a link ready for public demonstration, but I need to secure a little bit the server before (security, security...).
A linky that does a shows you all teams in my database (over 2500 teams, might be long a modem access) will be available later today.
:D
Edit : I am uploading D VI teams now (roughly 8000 teams, half of them being bots...)
dola. All French teams are uploaded (10920)
Link to test pages
Level 2 teams (http://hatstats.free.fr/show_level2teams.php)
Level 3 teams (http://hatstats.free.fr/show_level3teams.php)
Level 4 teams (http://hatstats.free.fr/show_level4teams.php)
Level 5 teams (http://hatstats.free.fr/show_level5teams.php)
Level 6 teams (http://hatstats.free.fr/show_level6teams.php)
Warning. The lower the series, the more teams will show => slow page loading when like me you still don't have high-speed internet access...
fantastic flying froggies
02-07-2004, 08:19 AM
Hey I'm in position 405 in div V !
Great job Alf !
On a side note, a team name that cracked me up : j'entend tes fesses claquer... :D
And no, I do not care to translate that one !!!
BreizhManu
02-07-2004, 09:05 AM
position 349, I beat you :p
et sinon c'est vrai que ça claque bien comme nom :D
Les critères de tri (les mêmes que ceux qui servent à déterminer les matches de coupe)
1 - position
2 - points
3 - GA
4 - Buts pour
5 - je trie plus si il y a égalité
Je pensais plutôt un classement sans tenir compte de la position (comme ça) - de toutes façons, c'est juste un requête SQL un peu différente :D
1 - points
2 - GA
3 - Buts pour
4 - je trie plus si il y a égalité
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.