|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
[TBA]: Issues with TBA API
I just downloaded the TBA API and placed it on my server. I thought that the API would work pretty much right out of the box, but I can't get it to work. I inserted my API Key and changed the team number to reflect my team. I checked that php5 is installed on the server. The "Team History" (api_team_history.php) script seems to be working, but it's not pulling any data. In fact, it doesn't seem to be pulling any of the information it needs from the API client file(tba_api_client_PHP5.php).
Here's the page I set up to test the API. http://delphielite.com/tba.php This page is strictly the Team History code placed inside of an HTML page. Nothing special. All I get is a few of the echos from the team history page but no real information. Can anyone help me get this working. |
|
#2
|
|||||
|
|||||
|
Re: [TBA]: Issues with TBA API
I just set up my own install, and things work fine. I suspect your API key is failing to authenticate somehow.
In tba_api_client_PHP5.php, did you change [[$api_key = ""; //replace with your API key]] to be your API key in quotes? If you left the quotes out, your api key will be "0", which isn't going to work. |
|
#3
|
|||
|
|||
|
Re: [TBA]: Issues with TBA API
when trying to echo the API key, nothing is returned. Not even a value of zero.
I did place the API key inside the quotes. This is why I'm so confused. It's like the client page isn't being included, but I see no reason for it not to be. |
|
#4
|
|||||
|
|||||
|
Re: [TBA]: Issues with TBA API
I find that really baffling. I don't see why your include would fail.
Try echoing something else from the main library? Could there be something wrong with the chmodding of files that would make them not include? ![]() |
|
#5
|
|||
|
|||
|
Re: [TBA]: Issues with TBA API
Well, it seems that the reason I couldn't echo the api_key is because it was enclosed in the tba_send_request function. Once I brought it out, I was able to echo the key.
I don't know too much about functions, so I'm wondering how you call one of these functions in your code. Does it just execute, or do you have to call it? |
|
#6
|
|||
|
|||
|
Re: [TBA]: Issues with TBA API
Where do you specify
PHP Code:
PHP Code:
I'm just a beginner in PHP, so please bear with me. This is all the original code, except for the addition of the api key and the team number. I started to toy with echo statements after it wouldn't work and I have since then removed those. I've chmodded the files to 777. No change. |
|
#7
|
||||
|
||||
|
Re: [TBA]: Issues with TBA API
Quote:
You're sure that PHP is installed correctly? You could try this short script to make sure...if PHP is installed okay it will return a web page with information about your PHP/system configuration. If PHP is installed correctly, all you should have to do is fill in your API key, and put both files in the same directory on your web server and then view api_team_history.php with a web browser. PHP Code:
Last edited by Greg McCoy : 09-03-2008 at 03:28. Reason: improved clarity |
|
#8
|
|||
|
|||
|
Re: [TBA]: Issues with TBA API
PHP is working fine on the site. In fact, most of our site is in PHP.
Does PHP need to be configured any certain way? I believe safe mode is turned on by default. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Test new TBA feature | Greg Marra | The Blue Alliance | 25 | 28-03-2008 04:31 |
| [TBA] The Blue Alliance API | cjelly | The Blue Alliance | 9 | 24-02-2008 23:37 |
| [VIDEO] TBA Match Archives | Greg Marra | General Forum | 16 | 25-03-2007 12:21 |
| [TBA] TBA Presents... Soldering and Multimeter Tutorials | Greg Marra | General Forum | 0 | 27-01-2007 20:15 |
| [TBA] The Blue Alliance | Greg Marra | Technical Discussion | 41 | 20-12-2006 23:28 |