Random Renegade Bits
Whatever comes to mind
Browse: Home / php
  • Old Projects and Content
    • Old Wallpapers
  • Wallerizer – Wallpaper Sizer
  • Zombinanza!

php

Get the Bounding Box of an SVG Path

By epb on February 6, 2011

There may be times you need to find the bounding box of an SVG path. One way to find it would be to parse the path and then apply any group transformation on it to find the range of X and Y coordinates the object occupies. However that’s a bit of code, and I’m quite [...]

Posted in php | Tagged hopefully_that_made_sense, ImageMagick, php, problem, svg | 4 Responses

Resize and Crop to a specific width x height with a crop suggestion point.

By epb on July 18, 2010

I really don’t have a shorter description for this.  I was working on a personal project the other day and realized that this might be a nifty function.  Basically, you know all those snippets to make cropped thumbnails (squares and the like), and how most of them either center or crop to the top of [...]

Posted in php | Tagged gd, images, php

Embed Album Art into an MP3 with PHP

By epb on May 31, 2010

An odd quest perhaps: but adding album art to an MP3 (in ID3 tags) is readily doable with the KTaglib extension for PHP.  Once you have it, you can use a script like this to add artwork to an MP3: $mp3 = new KTaglib_MPEG_File(’2.mp3′); $idv2 = $mp3->getID3v2Tag(true); $album = new KTaglib_ID3v2_AttachedPictureFrame(); $album->setType(KTaglib_ID3v2_AttachedPictureFrame::FrontCover); $album->setPicture(‘testalbum.jpg’); $album->setMimeType(‘image/jpeg’); $idv2->addFrame($album); [...]

Posted in php | Tagged metadata, mp3, php

SVG to online coloring-sheet SWF

By epb on March 12, 2010

You can do quite a bit of unorthodox stuff with PHP.  If you head over to epbsoft.com, you’ll find several flash coloring sheets I made with PHP, not Flash.  (Sort of anyway.)  I make them by first creating specially formatted SVG (Scalable Vector Graphics) files and feeding them to a PHP script that writes ActionScript [...]

Posted in linux, php | Tagged actionscript, flash, php

MongoDB looks Interesting

By epb on March 3, 2010

I might take a look at installing MongoDB on my server.  I like the idea of a document-driven, NoSQL database, especially after working with relational SQL databases for years, and MongoDB looks interesting.  You can read more about it in Developing scalable PHP Applications using Mongo DB. What caught my interest is how flexible using [...]

Posted in linux, php | Tagged php, rambling

PHP: Random Password Oneliner

By epb on October 14, 2009

I am exceedingly lazy, so I made a one-liner random password generator. How it works: Creates an md5 from a random string, packs this into binary representation, base64 encodes that, strips some of the characters used by base64 (most importantly the = that are typically at the end), and then limits it to 8 characters. [...]

Posted in Uncategorized | Tagged code, php | 1 Response

Update on phpBB3.0.4 on PHP 5.3.0RC2

By epb on May 15, 2009

Hmm… well it’s not crashing outright according to GDB, so I can only imagine it’s encountering a fatal error along the installation process. Update: It’s dying on the line that reads $install->load(); However, it doesn’t toss an error when it does so. Interesting. It does not crash there, however, if I modify it to be [...]

Posted in Uncategorized | Tagged php, web

phpBB 3.0.4 on PHP 5.3.0RC2

By epb on May 14, 2009

I went ahead and decided to try installing phpBB 3 on PHP 5.3.0RC2 running CGI. The initial build of PHP 5.3.0RC2 went incredibly smoothly, and only a handful of tests failed when I ran `make test.` Got it installed in my web server’s chroot environment and phpinfo runs fine. (After accidentally configuring CGI to use [...]

Posted in Uncategorized | Tagged php, web

Search

Archives

  • May 2013
  • February 2013
  • December 2012
  • September 2012
  • June 2012
  • February 2012
  • January 2012
  • October 2011
  • April 2011
  • February 2011
  • November 2010
  • October 2010
  • September 2010
  • July 2010
  • June 2010
  • May 2010
  • March 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • February 2009
  • September 2008
  • August 2008
  • December 2007
  • August 2007

Tags

actionscript android charity CherryPad cloud code computer problems danbooru encryption flash fuse game gd hard drive ImageMagick image manipulation images Internet linux marisa metadata mounting mp3 music outside_tutorials perl php pipes problem python rambling rss screenshots search slightly random solved storage svg tablets tcpdf touhou ubuntu utility vhd web

About

A random blog where I write about my programming projects, Linux, the occasional video game and anything else that comes to mind.

Copyright © 2013 Random Renegade Bits.

Powered by WordPress and Hybrid.