x

Your Pages - Setup PHP Site

Sample PHP Page, Server-Side Fetch League Standings, VBScript

Return - Your Pages Setup

In this sample, you only need the programming in blue.

For a quick-start, you can copy and paste this entire code to a file in your website named "SampleServerFetchLeagueSchedule.php", then view this page in your browser: http://(YourSite)/SampleServerFetchLeagueStandings.php

Working sample: http://php.divebarsussex.com/SampleServerFetchLeagueStandings.php?rES=3&rSP=1&rLN=236&rDM=0
(displaying the sample code below)

If you would rather skip the sample page, just copy and paste the blue lines into your .php page.

<?php
    // Sample League Standings file, using server-fetch, for PHP
    // ---------------------------------  Retrieve settings from the Query String
    $xES = $_GET['rES'];     // EstablishmentNumber
    $xSP = $_GET['rSP'];     // SportNumber
    $xLN = $_GET['rLN'];     // LeagueNumber
    $xDM = $_GET['rDM'];     // DisplayMode
    // ---------------------------------  The next 2 settings for options on this page
    $xMO = 1;                // Set MouseOverTeam and MouseOverRow Hi-Light effect
                             //    (1=enable,0=disable)
    $xFD = 1;                // Set TopOfPage FullDisplay elements (1=enable,0=disable)
                             //   (the PrinterFriendly link and Standings link)
    $URLStr = 'http://www.easyleagues.biz/Content/Standings.asp?' . 'rES=' . $xES . '&rSP='
        . $xSP . '&rLN=' . $xLN . '&rDM=' . $xDM . '&rMO=' . $xMO . '&rFD=' . $xFD;
    $fetchedEasyLeaguePage = file_get_contents($URLStr); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
  <title>Server-Side Fetch Sample - League Standings</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link href="http://www.DiveBarSussex.com/EasyLeagues.css" rel="stylesheet" type="text/css" />
  <style type="text/css"><!--
  .easyLeaguesDiv  {width: 90%; margin: 5px 5%;
                    padding: 10px; border: 1px solid #c0c0c0;} --></style>
</head>
<body>
  <div style="width: 800px; height: 100px; border: 1px solid #000000;">
    Your page header/banner here.
  </div>
  <div style="width: 800px; border: 1px solid #000000;">
    <p>Your personalized page-body content here, before the League Standings content.</p>
    <!-- The first part of your page programming before here -->
    <!-- Begin needed programming -->
    <div class="easyLeaguesDiv"><?php  echo $fetchedEasyLeaguePage; ?></div>
    <!-- End needed programming -->
    <!-- The remainder of your page programming after here -->
  </div>
  <div style="width: 800px; height: 100px; border: 1px solid #000000;">
    Your page footer here.
  </div>
</body>
</html>

The above sample demonstrates a method for assigning the values needed further down in the page. For those site designers desiring a more condensed version of required code, visit the Schedule information page for a server-side fetch example.

How it works, required programming.

This page works just like the Sample League Select page, with a fetch to the URL (address) "http://www.easyleagues.biz/Content/Standings.asp".

Required Query String Parameters.

The EasyLeagues.biz content for both the web page version and printable version of the Schedule page originates from the same file: "http://www.easyleagues.biz/Content/Standings.asp". The parameter "rMO=1" will enable the MouseOver high-lighting in the web page version (setting "rMO=0" will disable the MouseOver high-lighting for the printable version). The parameter "rFD=1" will enable FullDisplay of the top-of-page links to a printer-friendly version and also the standings page (setting "rFD=0" will prevent the top-of-page information from appearing on the printer-friendly version of the Schedule).

Remember to seperate each parameter with an "&" (ampersand).

Sample Page Styles and Links

The styles and links in the sample pages will not work properly until you have copied the sample CSS files to your site and configured "Settings" in EasyLeagues.biz, but the content will display without problem.