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.

Really Read It

Read articles and get free pizza

really read.it is a fun way to actually read articles every day. I know that we all love to skim through, but if you had a purpose (like PIZZA) then would you really read it?

https://reallyread.it/

 

Plastic Bag Found at the Bottom of World’s Deepest Ocean Trench

The Mariana Trench—the deepest point in the ocean—extends nearly 36,000 feet down in a remote part of the Pacific Ocean. But if you thought the trench could escape the global onslaught of plastics pollution, you would be wrong.

A recent study revealed that a plastic bag, like the kind given away at grocery stores, is now the deepest known piece of plastic trash, found at a depth of 36,000 feet inside the Mariana Trench. Scientists found it by looking through the Deep-Sea Debris Database, a collection of photos and videos taken from 5,010 dives over the past 30 years that was recently made public.

(via National Geographic)

Kids Can’t Tell Time Anymore

Schools in England are removing analog clocks from classrooms because students can’t tell time with them since they only understand digital clocks. While this may be shocking – Jimmy had the feeling that we might have the same problem here. So we went out on the street to ask kids if they know what time it is and these are our very unscientific findings.

(via Jimmy Kimmel)

May the 4th be with you

may the fourth be with you

may the fourth be with you

Sonic Youth – Bull In The Heather

Sonic Youth – Bull In The Heather

The Beatles messing with the press

The Beatles messing with the press

These guys were the best and knew from the start how to handle the media!

How Censorship Shaped Batman: The Animated Series

How Censorship Shaped Batman: The Animated Series

From dorkly:

 

There are a lot of reasons Batman: The Animated Series has held up so well over the past 25 years. Any fan will tell you that film noir/art deco style is timeless, the cast is impeccable and the stories were compelling to all ages. While the show didn’t talk down to kids, it was still beholden to the network and its advertisers — so that meant that Broadcast Standards and Practices would often have the final say when it came to what could air on Saturday morning. There’s no doubt that censorship diluted the impact of certain B:TAS episodes, but there’s an argument to be made that the show flourished in ways it wouldn’t have without those creative restraints.

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!