Showing posts with label Atropa Toolbox. Show all posts
Showing posts with label Atropa Toolbox. Show all posts

Language Is A Virus and WTF-O-Vision

I am both excited and honored to announce that languageisavirus.com has integrated the Glorious WTF-O-Vision into the writing games section of their site! http://www.languageisavirus.com/wtf-o-vision

languageisavirus.com is a wonderful website filled with articles, games, and exercises designed to aid writers and cure writers block. If you like writing then I highly recommend bookmarking this website and visiting often!

disable-output-escaping is not supported in Firefox

CDATA concatenation

or: disable-output-escaping is not supported in Firefox

Recently I was working on generating XML documents to contain arbitrary text. Naturally I wanted to make things easy on myself by wrapping said arbitrary text with CDATA sections. It just so happens that the text in question contains CDATA tags and as everyone knows, CDATA sections can not be nested. After searching around the web and running into "answers" that were pure opinion on what XML is, is for, and should do, I still didn't have the simple answer to a common problem so I wrote it myself and posted it here.

Turn PHP Built in Web Server into a Proxy

PHPMonkey? I wanted to use PHP to alter web pages and http traffic, so I downloaded many scripts that said they were PHP proxy. I didn't find any that really worked, they all just fetched the page, mangled all the links, and puked it back at me. I couldn't log in to any website, and if the site I was visiting used javascript to inject links, scripts, and all sorts of other dynamic content these so called proxies failed horribly. So, I figured I'd try writing one myself, and I've come up with something that works.

Autoindex for PHP Built in Web Server

Today, while working on the Atropa Toolbox, I wanted an autoindexing option for the PHP built in webserver like the Apache HTTP server has. By default the PHP server was giving me 404 errors whenever I would request a directory that didn't have an index.php file in it. The documentation said that the PHP command line web server would recognize index.html files but that didn't appear to be working for me. There wasn't a chance I was going to create hundreds of index.php files just to be able to navigate through directories on my server, so I wrote a router script to automatically generate a hyperlinked list of files and directories when I reach a folder that doesn't have an index.php or index.html file. The router recognizes index.html and will redirect the browser to it if present. While it isn't as fancy as the autoindexing options on the Apache server, it gets the job done. I can now click on the names of files and folders and make my way through the filesystem on the PHP commandline webserver. If you would like a copy of the router I'll post the code below. Any updates I make to this basic router will be incorporated into the Atropa Toolbox currently hosted on google code.