You are not logged in.
Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/usr/bin/env python import glob import random import time if int(time.time()) % 5 == 3: print 'Content-Type: image/jpeg\n' image = random.choice(glob.glob('*.jpg')) else: print 'Content-Type: image/png\n' image = 'codemonkey.png' for line in open(image): print line, |
This post has been edited 1 times, last edit by "Y0Gi" (Jan 22nd 2013, 3:48am)
Quoted from "Bluefake"
Oh Mann! Bislang fand ich das ja lustig, aber jetzt, wo es jeder kann...![]()
#
Quoted
If the script's .py ending is not accepted by forums, you can use mod_rewrite
to make an alias. In the same directory as the script, create a .htaccess file
with this content (without leading indention):
RewriteEngine On
Options +FollowSymLinks
RewriteRule ^avatar.jpg$ avatar.py [PT,L]
This post has been edited 1 times, last edit by "Y0Gi" (Jan 22nd 2013, 3:48am)
-