Go to Post it's possible, based on his widespread approval, that Frank is in fact a collection of kittens in a human suit - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-09-2011, 15:56
quinxorin quinxorin is offline
Mentor now :(
AKA: Ian Pudney
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Lightning Robotics
Posts: 148
quinxorin will become famous soon enough
Re: Match Results API for your website

Quote:
Originally Posted by KeatonM View Post
This is great!

My question, however, is regarding the number of events you can have.
...
I added the fourth event, and the page no longer seems to cache and update. I'm not awesome with PHP, so I'm wondering if three events is the max, hardcoded number in the script, or if I should be able to add the fouth event.

Thanks again for coding this!
Interesting. Yes, you should be able to add all the events you attended. I just tried it, and it worked fine for me. PHP is often set up differently on different servers, however, which means that it behaves differently.

It does work with just three, right?

Try the following:
1. Make sure that your team number is properly defined in the config file. It should read:
PHP Code:
$teamnumber=27
2. Try adding the following line to the config file while testing, but be sure to remove it before publication:
PHP Code:
$bypass_scrape_protection=true
That line has to do with the scrape protection system that I implemented in the most recent version (see above). It was hurried out, so it still has flaws that I will fix. That line will disable it.
3. Check to make sure the www2.usfirst.org domain is online. They must be doing some upgrades or something, because it seems to be going down for short periods every few days, or at least it did when I was building this system. It got frustrating.
4. If it's still not working, add the following line to the top of the matchresults_config.php file:
PHP Code:
error_reporting(E_ERROR E_WARNING E_PARSE); 
then use the system again. That will make PHP spit out any errors that might have occurred. If it's something about the max execution time (or time limit) being exceeded, then use:
PHP Code:
set_time_limit(60); 
to set the max execution time to one minute instead of the default 30 seconds. This means that your server doesn't have a fast enough connection (unlikely) or enough processing power to handle four events in 30 seconds. If it gives an error about a memory limit, use the similar function:
PHP Code:
ini_set('memory_limit''256M'); 
to increase the memory limit to an outrageous amount.

Normally, you'd use matchresults_viewrecord.php. When testing, try using matchresults_output_show.php. That is the most basic one - it won't use AJAX Refresh or even save to the cache, just get you your data.
__________________
"Sed res docuit id verum esse, quod in carminibus Appius ait, fabrum esse suae quemque fortunae."
- Every man is the architect of his own fortune.

Last edited by quinxorin : 08-09-2011 at 15:59.
  #2   Spotlight this post!  
Unread 12-09-2011, 11:41
KeatonM's Avatar
KeatonM KeatonM is offline
Registered User
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Dallas, TX
Posts: 83
KeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant futureKeatonM has a brilliant future
Re: Match Results API for your website

Yes, it works with just three! I didn't mention that!

Everything was correctly configured, and the page matchresults_output_show.php did show all 4, so my guess is that the cache process doesn't work on my server (shared hosting with Arvixe.com).

My PHP configuration is Memory_limit = 256M, max_execution_time = 600
__________________

Team RUSH 27 Alumni

Personal/Resume: http://keatondm.com
Social: http://twitter.com/keatonm27 & http://facebook.com/kdmantz


Anyone who has never made a mistake has never tried anything new.
- ALBERT EINSTEIN
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 00:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi