Hey, you!

A very simple project which takes the advantage of HTTP referrers.

What’s this?

Hey, you! is a website displaying a customizable header and some text, which may contain the URL of the site where Hey, you! was linked. For example, you may create a custom Hey, you! like this one and post it on your Facebook wall:

Hey, you!
Stop browsing [REF] and go get some life!

Everybody who clicks the link on Facebook will see a message like this:

Hey, you!
Stop browsing facebook.com and go get some life!

What’s inside

It was built in PHP and styled using CSS3. Doppio One is provided by Google Web Fonts, the jQuery library is also fetched from Google servers.

Two jQuery plugins are used: one for autosizing the editor <textarea> as the user types and another one for limiting it’s maximum length. The text is passed via GET parameters and encoded with base64, so there’s no plain text in URLs.

If the script fails to fetch the referrer (when the user agent is blocking referrers, site address is typed directly into addressbar, copied, sent via instant messenger etc.), it uses the string ‚www’ instead. Otherwise, http:// and www. parts are removed and so is everything after site domain. The URL displayed is saved in a cookie for next hour.