isn't quite ashamed enough to present

jr conlin's ink stained banana

2007-02-01

:: No, It's MY Space

A few quick programming notes (as in code, not TV):

  • PHP's GD library has some rather annoying quirks, including:
    1. imagecreatefrompng() doesn't understand Alpha transparencies, it instead just uses a black background.
    2. imagecreatetruecolor() does understand alpha channels, but uses a black background
    3. regardless of whatever tricks you try to pull, copying an alpha png to a truecolor image background will not cause an proper merge because the freaking png is on a black background!
  • If you want to stamp any and all images being leeched from your site with a sponsor tag, it's pretty easy to do. First add to your .htaccess file:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} myspace.com
    RewriteRule (.*(gif|png|jgp)$) /stamp.php?i=$1

    then, create your stamp.php file.
    Feel free to modify that file to append an "image footer" if you like.
  • Yeah, those myspace folks tend to grab images, but hey, think of them as "ads for you".

  1. 2007-02-01 02:17:28
    Oooh. ALL of the about 2550 hits in January from various social sites (like myspace) were hotlinks for .jpgs ... gnomebondage, eh? Hmmm.
  2. 2007-02-02 11:42:35
    But isn't it more fun to just goatse.cx them?
  3. 2007-02-02 13:33:02
    Nope. It's more fun to turn them into ads that I can sell for money. Because money is always fun.
  4. 2007-02-02 16:57:34
    Would you goatse.cx them if we paid you? I'd buy that for a dollar!
  5. 2007-02-03 10:07:39
    This might help http://attrition.org/attrition/how-anti-theft.html
Wanna join in?

Blogs of note
personal that's my blog
(The Official Blog of the Internet)
memoirs of hydrogen guy matthew shepherd (quebec) rhapsodic.org Henriette's Herbal Blog lynne ydw i slumbering lungfish
geek Y!Cool Thing jeremy z
(The Official Website of the Internet)
dave's picks ultramookie Josh Woodward derek balling simon willison
news ars technica search engine watch

Powered by WordPress
Hosted on Dreamhost.