", "", $url)); $url = implode('', $chunks); $country = snagCountry($url); $chunks = preg_split("/dp/", $url); if (isset($chunks[1])) { $postbits = split("/", $chunks[1]); return "http://a.celestrion.net/".$country."X/".$postbits[1]."/".$postbits[2]; } $chunks = preg_split("/gp/", $url); if (isset($chunks[1])) { $postbits = split("/", $chunks[1]); return "http://a.celestrion.net/".$country."Y/".$postbits[1]."/".$postbits[2]; } return ""; } function shortenRetardedAmazonURLBecauseLongOnesAnnoyDan($url) { $chunks = preg_split("/[\s]+/", str_replace(">", "", $url)); $url = implode('', $chunks); $country = snagCountry($url); $chunks = preg_split("/dp/", $url); if (isset($chunks[1])) { $postbits = split("/", $chunks[1]); return "http://amazon.".$country."/dp/".$postbits[1]."/".$postbits[2]; } $chunks = preg_split("/gp/", $url); if (isset($chunks[1])) { $postbits = split("/", $chunks[1]); return "http://amazon.".$country."/gp/".$postbits[1]."/".$postbits[2]; } return ""; } function snagCountry($url) { preg_match('/amazon\.([A-Z0-9a-z.]+)\//', $url, $matches); if (isset($matches[1])) { return $matches[1]; } else { return "com"; } } ?>

Less is More!


0) { ?>

Your shortened auction URL is:

To go directly to Amazon, use this URL:

The information you gave me doesn't look like an Amazon item-page URL. You gave me this:

Click here to try shortening another Amazon URL.

In the text field below, post a URL for something you saw on Amazon. In return, I'll strip out the extra Amazon crap (as well as any quote indicators, should you be pasting from an electronic mail message) and give you an extra-short URL that will take you straight1 there.

Long, Nasty Amazon URL:



1 Well, I'll also hand you a tiny URL that bounces off this server and redirects you to the item you wanted to see.