Skip to content

This is a web app version of the TGCTours Card Maker and ported to PHP

License

Notifications You must be signed in to change notification settings

csmith1210/TGCTCM-Web

Repository files navigation

TGCTours Member Card Maker: Web App

Project Description:

This is a web app version of the TGCTours Card Maker that was ported to PHP to run off any Apache or Nginx web server. This app will add users to the SQLite database as they load the script with their player ID and template choice. Then, a script is able to be called in a cron job to automatically update every user's image so that each week's stats are added to the image. Users now only have to link to their respective card images in their signatures and do not have to update it themselves.

File Descriptions:

  • .htaccess
    • Denies access to *.db files to outside connections and prevents browser caching of images using HTML ETags.
    • For Apache web servers. To convert to Nginx site.conf format please go here and see this page.
  • index.php
    • This is the welcome page for the web app. It contains an HTML form to facilitate easy access to a player's member card and will replace the form with the user's image.
  • mkimg.php
    • This script is the true port of the C# application to PHP since it contains the main functions of the web app. Scrapes TGCTours.com and saves a player's statistics to a template of their choosing.
  • update.php
    • This script loops through every user in the SQLite database and updates their member card image. This is to be used in combination with cron (or a poor man's cron implementation) to update the images periodically without the need for user interaction.
  • rb.php
    • This is the RedBeanPHP object relational mapping package used to facilitate database management and simulate C# DataTable objects.
  • red.db
    • The SQLite database file. The file in this repository is empty.

How to use the program:

  1. Load the files onto an Apache or Nginx webserver, or access the web app here.
    • If using your own webserver, ensure the .htaccess file or site.conf is configured properly. Also be sure to set a cron job to call update.php every 3 days or so (however often you want).
  2. On the welcome page, enter the player's ID and template choice, then click the Get Image button.
  3. Copy the outputted BBCode to your signature on forums, or use the image URL however you like.
  4. The web app will automatically update your members card with each weeks stats as the TGCTours website is updated.
    • This will actually have a delay due to the cron job execution requirement.

Acknowledgements:

The Templates:

Designed by EmeraldPi:

Designed by Pablo:

About

This is a web app version of the TGCTours Card Maker and ported to PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published