Blindsided

Rugby analysis, fast & simple

Recent Results

Players

Top Try Scorer

loading…

Top Tackler

loading…

Best Attacker

loading…

Best Defender

loading…

Super Sub

loading…

Birthday Today

loading…

Top Goal Kicker

loading…

More

Add another card

Teams

Best Attended

loading…

Try-Scoring Teams

loading…

Best Defence (conceded tries)

loading…

Set Piece Strength

loading…

League Leaders

loading…

Table Standings

Select comp

Top Coaches

loading…

Placeholder

Replace with another box

Referees

loading…
=== api/home/top_tackler.php === <?php header('Content-Type: application/json; charset=utf-8'); // SQL: SELECT playerName AS player, tackles AS value, CONCAT(teamName, ' — ', tackles, ' tackles') AS detail FROM player_season_totals ORDER BY tackles DESC LIMIT 1; $sample = ['player'=>'A. Taulupe','value'=>143,'detail'=>'Highlanders — 143 tackles']; echo json_encode($sample); ?> === api/home/best_attacker.php === <?php header('Content-Type: application/json; charset=utf-8'); // Precalculate attack_score in a view or cron job: defenders_beaten + clean_breaks + carries $sample = ['player'=>'C. Kefu','value'=>48,'detail'=>'DefBeaten 18 • CleanBreaks 10 • Carries 20']; echo json_encode($sample); ?> === api/home/best_defender.php === <?php header('Content-Type: application/json; charset=utf-8'); // Simple defensive score from precomputed totals $sample = ['player'=>'P. Poitrenaud','value'=>61,'detail'=>'DomTackles 22 • Tackles 39']; echo json_encode($sample); ?> === api/home/super_sub.php === <?php header('Content-Type: application/json; charset=utf-8'); // WHERE jersey >= 16 and minutes_off_bench > 0 $sample = ['player'=>'B. Substitute','value'=>22,'detail'=>'Impact +22 (from bench)']; echo json_encode($sample); ?> === api/home/birthdays.php === <?php header('Content-Type: application/json; charset=utf-8'); // Simple: find players with birthday = today $sample = ['player'=>'D. de Allende','detail'=>'Age 33']; echo json_encode($sample); ?> === api/home/top_kicker.php === <?php header('Content-Type: application/json; charset=utf-8'); // Return top goal kicker (penalties + conversions) from summary table $sample = ['player'=>'S. Smith','value'=>87,'detail'=>'Pens+Conv = 87']; echo json_encode($sample); ?> === api/home/table_standings.php === <?php header('Content-Type: application/json; charset=utf-8'); // Accept comp param: ?comp=1 // Example output: [{team:'Leaders',points:42},{team:'RunnerUp',points:36},...] $sample = [ ['team'=>'Leaders','points'=>42], ['team'=>'RunnerUp','points'=>36], ['team'=>'B','points'=>30] ]; echo json_encode($sample); ?> === api/home/referees.php === <?php header('Content-Type: application/json; charset=utf-8'); $sample = [ ['ref'=>'J. Doe','upcoming'=>'Team A v Team B (Sun)'], ['ref'=>'M. Smith','upcoming'=>'Team C v Team D (Sat)'] ]; echo json_encode($sample); ?> === NOTES & IMPLEMENTATION GUIDANCE === * Do NOT compute heavy metrics live on page load. Prepare a cron job or trigger that writes pre-aggregated totals into tables such as `player_season_totals`, `team_season_aggregates`, etc. * Index columns used in ORDER BY and WHERE. * Add a small server-side cache layer if you expect high traffic (file cache, memcached, Redis). The JS uses per-page-cache to avoid repeat calls. * For debugging, return small sample JSON like above. When replacing with real SQL, use parameterized queries and return the same JSON shapes. */