Since you were using the flickr badge style before, I fashoned this using the same technique that they use.
First save this into your zen directory as random.php
`<?php
require_once('classes.php');
$imageSize = (isset($_GET['s']) ? $_GET['s'] : 200);
$randomImage = getRandomImage();
$imageLinkURL = getImageLinkURL($randomImage);
print "document.write('[Image:
http://yourserver.net/photos/zen/random.php]</script>`
Also, you can pass a size in like so if you don't want the default size (200):
`<script type="text/javascript" src="http://yourserver.net/photos/zen/random.php?s=100"></script>`