Filter
Web apps
Search
Blogroll and links
User
Archives
Category Archives: PHP and web
Xbox Live script
If you’re not a member of the XCDP, the only way to access gamertag information is via the public “gamercard”, here. Microsoft, being Microsoft, hasn’t really left the information in a particularly useful format, so here’s a small script that boils all the HTML down to the bare stats and facts. (more…)
Posted in PHP and web
2 Comments
PHP syntax highlighter
Here’s a basic PHP “syntax highlighter” function: (more…)
Posted in PHP and web
Leave a comment
PHP: empty(), is_null() and isset() comparison
The subtle differences between empty(), is_null() and isset() are common source of confusion and uncertainty. So in this post I’ll try and clarify how these three (boolean) functions work. (more…)
Posted in PHP and web
Leave a comment
BF:BC2 and MOH stats API
I’ve put together a small API that provides basic statistics for Battlefield: Bad Company 2, and Medal of Honor in XML form. The stats are sourced from StatsVerse.com and not direct from EA. Feel free to use the API as you see fit, but bear in mind that the API is reliant on a third-party (Stats Verse), so I cannot guarantee its reliability. (more…)
Posted in PHP and web
Leave a comment
Logic gate simulation
To compliment yesterday’s post of logic gates, I’ve put together a series of super-simple little functions that simulates the output of the gates. This is not so much a post on programming, since the functions are so small and basic, but it may help you understand exactly how these gates work. (more…)
UPDATED: Standard deviation function
Updated (original from 25/02/11): now includes a C version of the function.
Here’s a really simple PHP function for calculating the standard deviation of a set: (more…)
Posted in C programming, PHP and web
Leave a comment
Secure flat files, PART 2
Yesterday I talked about a method for securely keeping information in PHP flat files. However it’s just occurred to me that I never spoke about putting the data into the flat file to begin with, so here goes… (more…)
Posted in PHP and web
Leave a comment
Secure flat files, PART 1
Flat files are traditionally simple text files (.txt). But there’s a problem with this- someone simply has to type in the address of the file and they can see whatever’s stored in it. (more…)
Posted in PHP and web
Leave a comment
Pascal’s Triangle script
Here’s a fairly straightforward script for calculating and displaying Pascal’s Triangle, used for expanding equations. Instructions at the bottom. (more…)
Posted in PHP and web
Leave a comment
PHP Tutorial: Echoing
“Echoing” is simply PHP jargon for displaying something. In HTML to display some text, all you do is type it out- you don’t even need any tags. However in PHP you have to use the echo command, like so: (more…)
Posted in PHP and web
Leave a comment