A developer provided me with the following PHP file (although I have removed the API key and Secret):
/**
* League Championships
*/function fetch_league_table(){// Replace with your actual API credentials
$apiKey ='xxxx';
$secret ='xxxx';// Generate a digital signature (sig) using the current timestamp
$timestamp = time();
$sig = hash_hmac('sha256', $timestamp, $apiKey . $secret);// API endpoint and query parameters
$apiUrl ='https://secure.rugby-league.com/api/leaguetable';
$queryParams =['compID'=>4,// Replace with the appropriate competition ID'sig'=> $sig
];// Build the full URL
$urlWithParams = $apiUrl .'?'. http_build_query($queryParams);// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $urlWithParams);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_HTTPHEADER,['Accept: application/json','x-api-key: '. $apiKey,'sig: '. $sig
]);// Execute the API request
$response = curl_exec($ch);// Check for errorsif(curl_errno($ch)){return'Error fetching data: '. curl_error($ch);}
curl_close($ch);// Decode JSON response
$data = json_decode($response,true);// Handle response and build HTML outputif($data['status']!==200){return'No data found.';}
$leagueTable = $data['data']['table'];
$output ="<h2>". $data['data']['competition']." - ". $data['data']['season']."</h2>";
$output .="<table border='1' cellpadding='5' cellspacing='0'><thead><tr>";
$output .="<th>Position</th><th>Team</th><th>Played</th><th>Wins</th><th>Losses</th><th>Draws</th><th>Points</th></tr></thead><tbody>";foreach($leagueTable as $position => $team){if($position ==='deductions')continue;
$output .="<tr>";
$output .="<td>". $position ."</td>";// Fetch the logo URL from the API response
$logoUrl = isset($team['logo'])? $team['logo']:'';
$logoHtml = $logoUrl ?"<img src='$logoUrl' alt='{$team['teamName']} logo' style='height:20px; margin-right:10px;'>":'';
$output .="<td><strong>". $logoHtml . $team['teamName']."</strong></td>";
$output .="<td>". $team['P']."</td>";
$output .="<td>". $team['W']."</td>";
$output .="<td>". $team['L']."</td>";
$output .="<td>". $team['D']."</td>";
$output .="<td>". $team['PTS']."</td>";
$output .="</tr>";}
$output .="</tbody></table>";// Display deductions if availableif(isset($leagueTable['deductions'])){
$output .="<h3>Deductions</h3><ul>";foreach($leagueTable['deductions']as $deduction){
$output .="<li>". $deduction['team'].": -". $deduction['pts']." points (". $deduction['reason'].")</li>";}
$output .="</ul>";}return $output;}
add_shortcode('league_table','fetch_league_table');
This PHP file provides us with the table on the website, although I note that the year is 2019. I think this is because the Leaguetable API endpoint doesn't have a year integer. I have been told that I should be able to get the year integer from the Competitions endpoint. But I am not a PHP developer, and I think that the developer that gave me this code got it by going through an AI prompt (i.e. he doesn't know PHP either).
I can see the API endpoint in the code, so I would imagine that I copy that, paste it again but modify the URL and the queryparams to search for year. But what I don't know is how I would then put the query params together so that the table being displayed (compID 4) is for the current year (ex. 2024).
Would someone be able to assist me or point me in the right direction? I tried emailing the support email in the documentation but they have been less than helpful.
yeah it seems to be Edge only. The dialog buttons work as expected in Chrome and Firefox. The phone is using Android 16 (OneUI 8.5) and Edge version 149.0.4022.53
I'm not aware of this issue, but to help the other guys.
What version of Android are you using?
Did you try a different browser? To see if Edge is the issue here.
I agree when are you going to read this (really poor BTW) article?
Here is a better article so you actually know what is going on and answers questions you had in other comments --> https://arstechnica.com/gadgets/2026/05/speed-boosting-low-latency-profile-is-one-of-the-improvements-coming-to-windows-11/
It is unclear if one will be able to disable the new profile at this point but I am not seeing any reason why one would.
I disagree; they come off very "bitchy" and "whiny".
Make a great product and combine that with a great price (free) and people will come over to your side. Or build it and they will come as they say.
Constantly trying to get attention by complaining all the time, will turn people off to your product.
It use to be a nightmare, with LibreOffice supporting a newer draft ODF standard by default, and Microsoft Office supporting the older non-draft standard. Now that they both support the same version of ODF, they should be interoperable.
Question
Nick H. Supervisor
Hi all,
Please see the following documentation for reference: https://secure.rugby-league.com/api/docs/
A developer provided me with the following PHP file (although I have removed the API key and Secret):
This PHP file provides us with the table on the website, although I note that the year is 2019. I think this is because the Leaguetable API endpoint doesn't have a year integer. I have been told that I should be able to get the year integer from the Competitions endpoint. But I am not a PHP developer, and I think that the developer that gave me this code got it by going through an AI prompt (i.e. he doesn't know PHP either).
I can see the API endpoint in the code, so I would imagine that I copy that, paste it again but modify the URL and the queryparams to search for year. But what I don't know is how I would then put the query params together so that the table being displayed (compID 4) is for the current year (ex. 2024).
Would someone be able to assist me or point me in the right direction? I tried emailing the support email in the documentation but they have been less than helpful.
Many thanks in advance.
Link to comment
https://www.neowin.net/forum/topic/1449886-php-issues-displaying-a-league-table/Share on other sites
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now