Whats the most weirdest program you have written with PHP?

Stuff and Things...

Whats the most weirdest program you have written with PHP?

This is taken from reddit.com/r/php

A local radio station were running a competition where they had three celebrities all say 1 word form a 3 word phrase.

Every time someone phoned in they published the wrong and right guesses on their facebook page. I wrote a script that stored those values and ticked them off a list of possibilities based on several sources(from various sources ‘whose who, imdb, etc). The idea is that over time people would narrow down by deductive reasoning who it was and this competition went on for about 7 months as the prize was £100k

The last celebrity was some complete unknown with very few references to them anywhere and the radios tation got in a bit of trouble for it.

The script was fun but totally useless due to the sheer data set it was working with 😀

echo ‘Hello World’; lol

In the early 2000s I wrote a PHP utility called Swiffy, which generated Flash SWF files on the fly, taking a string, font size, line height, colour, bgcolour and truetype font file as input.

It would then generate a Flash SWF file on the fly with the text and font embedded, and output HTML object code to embed the file into a webpage. It would dynamically calculate the dimensions of the text object, based on the font size, number of lines etc.

This was before (I was aware of) web fonts.

It worked well and I learned a lot about reverse engineering the SWF file format, binary data etc.

The best part was that my website was constantly hacked.

I also learned a lot about sanitizing input, register globals etc. 🙂

I still use PHP all the time, mostly as a command line utility, scripts for cron jobs etc.

Wrote a “solver” for finding the cheapest flight route in ZakMcKracken to save money…

Mostly did it for my younger sister who was too young to figure this particular problem out but otherwise could play the game.

Little did I know of anything and also back then never heard of the Traveling Salesman problem so it was rather brute-force-ish; but if you did wait long enough, it worked.

Oh … and it was in the late 90s. So it was probably not the kind of PHP code you know today. 🙂

If this thread proves anything… We’ve all been there.

Leave a Reply

Your email address will not be published. Required fields are marked *