|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
Greetings TBA. I'm with Team 2656, entering our second season of FRC. I was just looking at our page on the TBA website (which is awesome BTW) and a thought occurred to me... We've updated our team name/nick name on TIMS and added URL's there for our website and blog. I'd like to see this information mirrored on TBA, but I wasn't sure how/if I could update that. I assume that you all have something that syncs data with FIRST/TIMS? If so, then I guess we'll be all good after the next update and I won't worry about it any longer. If not, let me know and I'll be happy to submit further information for Team 2656. Thanks. I really like what ya'll and doing at TBA and we've got a link to our page there on the main page of our website. Please, keep up the great work!
|
|
#2
|
|||||
|
|||||
|
Re: [TBA]: Team info update?
I just went to run an update of the team data, and it seems that FIRST is doing something to block scripts from downloading team data. I am not sure what is going on, but (https://my.usfirst.org/myarea/index....=FRC&team=1388) gives me different source code depending on if I open it in Chrome or wget it, and I can't open the URL at all from my PHP scripts that worked last spring.
I will investigate this further, but we will do a complete team data update before ship date. Thanks! |
|
#3
|
||||
|
||||
|
Re: [TBA]: Team info update?
Quote:
|
|
#4
|
||||
|
||||
|
Re: [TBA]: Team info update?
Sounds like user agent sniffing to me. Could be hacked by setting the user agent (i.e. in PHP as described here) in whatever scripts are used, but it seems to me that a site as prominent in the FIRST community as TBA should be able to work out something a little more "over the table" with FIRST.
--Ryan |
|
#5
|
|||
|
|||
|
Re: [TBA]: Team info update?
The issue is that they switched TIMS data over to a secure site, and PHP lacked any SSL support until 4.3.0, and ever since it has been rather flaky. As an alternative without fooling with any libraries, you may be able to use fsockopen() to create a SSL or TLS socket. More than likely your host has heavy restrictions on socket-related functions, especially if you are on a shared hosting plan.
When they made the switch last season, I immediately updated my scripts to utilize the cURL library, which works beautifully in this situation. Many hosts now support it and I definitely recommend going this route. Here would be a simple cURL replacement for file_get_contents(): Code:
<?php $ch = curl_init(); $timeout = 5; // set to zero for no timeout curl_setopt ($ch, CURLOPT_URL, 'http://example.com'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $file_contents = curl_exec($ch); curl_close($ch); // display file echo $file_contents; ?> and a replacement for file(): Code:
<?php
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://example.com');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
$lines = array();
$lines = explode("\n", $file_contents);
// display file line by line
foreach($lines as $line_num => $line) {
echo "Line # {$line_num} : ".htmlspecialchars($line)."<br />\n";
}
?>
Hope this helps! Last edited by Matt Keller : 12-01-2009 at 02:48. |
|
#6
|
||||
|
||||
|
Re: [TBA]: Team info update?
I think a more likely explanation is they are trying to optimize the page for the user agent it detects. Their site has to handle a large amount of traffic and intentionally blocking screen scraping seems like a wasted effort to me.
|
|
#7
|
|||||
|
|||||
|
Re: [TBA]: Team info update?
Quote:
Ultimately, I feel that FIRST underutilizes their website, and could do a lot to promote and help the community. Potential sponsors and people looking for "official" info need a very different experience than students and mentors currently on teams, and I don't think FIRST does a very good job catering to the latter group right now. |
|
#8
|
||||
|
||||
|
Re: [TBA]: Team info update?
Quote:
|
|
#9
|
|||||
|
|||||
|
Re: [TBA]: Team info update?
4fx, IIRC, is the company that has been responsible for helping with competition control systems in the past few years since they stopped contracting Hatch Technologies. They wrote the match pairing algorithms and the software used at the regional to handle rankings and brackets, which exports the data to the FIRST website. This might export awards to TIMS, but TIMS is an older system than 4fx, and possibly than Hatch.
|
|
#10
|
|||
|
|||
|
Re: [TBA]: Team info update?
I have no problems with PHP 5.2.6 or wget 1.11.4 irrespective of user agent (the user_agent setting and -U argument respectively). (I forgot how much whitespace they use though.) Try again?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [TBA]: Info sent to cell phone... | Don Wright | The Blue Alliance | 12 | 18-04-2008 20:23 |
| [TBA]: Name/Nickname Update Ran | Greg Marra | The Blue Alliance | 0 | 21-03-2008 10:00 |
| [TBA]: outdated Team Info in Match Archives | adengler | The Blue Alliance | 5 | 08-03-2008 14:57 |
| **FIRST** **FVC Team Info** **Important Template Info** | Mark McLeod | FIRST Tech Challenge | 0 | 21-02-2007 12:41 |
| Update Contact Info TIMS | sanddrag | Regional Competitions | 3 | 03-10-2002 12:48 |