PHP-IRC module helper HTML5 script to detect a user's location and report it to a PHP-IRC bot
aziraphale/Location-for-IRC
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Location-Finder for the Associated PHP-IRC Module =========================================================== This is a simple Web page that fetches the user's geographical location and then, optionally, stores the result to be reported to IRC by a PHP-IRC bot running the related module. I originally created this script while I was learning about HTML5's geolocation functionality. It then evolved to allow me to report my location to IRC, which I sometimes use while driving to visit friends (who are also on IRC) - a simple load of a bookmarked Web page will automatically tell those friends where I am (and, therefore, roughly how far away I am from them and they can estimate when they can expect me to arrive). Configuration ------------------- Configuring this script is simply a case of changing the array at the top of the script that maps IRC nicks to a temporary file in which to store the location data. Usage ------------------- If accessed with no query string (GET arguments), this script simply fetches the user's location and displays it. If a "name" GET argument is passed, containing an IRC nick set in the $userList array, it will then store that location data in the relevant temporary file to allow the IRC bot to report it. Known Issues ------------------- * No verification is performed on the passed "name", so it is easy to spoof and claim to be someone you're not. This could be alleviated by using arbitrary, long, difficult-to-guess strings as the keys ("nicks") in the $userList array instead of IRC nicks. These keys are not required to match IRC nicks, however the passed "name" GET argument must match whatever has been set as the array key. * The script doesn't redirect elsewhere after submitting the location, so if the Web browser is closed (or removed from the running state & memory on mobile devices) and then subsequently re-opened, this page will be re-loaded and the user's location will be again reported, probably unintentionally. This can be fixed by automatically redirecting the page to, for example, a "?name=foo&done" query string after submitting the location, and not submitting the location if the "done" argument is present. A "reload location" button should probably then exist, as well.
About
PHP-IRC module helper HTML5 script to detect a user's location and report it to a PHP-IRC bot
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published