Category ArchiveDatabase
Database & PHP & Programming Wabler on 05 Dec 2006
Dynamic CSS files
Normally .css files are static, meaning, you create them once, and they stay that way, till you download them and rewrite them.
Now, with my solution below, you can make a css file that is completely dynamic. You can load just about everything you want into the file, and it will work just like a normal css file, because when the browser looks at it, the css file is just a css file.
The trick is to not do alot of processing on the css file, because the longer it takes to create it, the longer it will take your page to load (untill of course, your browser caches the css file). You can however drop(or include) a mysql_connect into the file, and pull values out of your database to populate your css file.
Note: The only thing that I have noticed that doesn’t work on my server inside of a .css file, are the PHP ’system’ commands.
The overall idea is simple, trick the server to treat the .css file as a php file.
So…go to your .htaccess file, either through your FTP/SFTP program (view dot files). Or use ‘ls -a’ in your ssh/command line program.
if you dont have an htaccess file, create one, either through command line, or by uploading it.
The string you need as the first two lines of your .htaccess file:
AddType application/x-httpd-php .html .php .css
Options Indexes FollowSymLinks Includes ExecCGI
Now, the “ExecCGI” may or may not be needed on your server, this depends on whether you are running PHP as a perl module or not.
Note: This will also allow you to run your .html files as a PHP file as well.
If you think about it, you can actually add just about any file extension into that first line, to make your server run it as PHP, examples include .yourmom, .is, .ugly, .or, .whatever
Mess with your users, embed PHP wherever you want, have fun!
Sphere: Related ContentDatabase & Programming Wabler on 19 Nov 2006
Oracle and their TOS/Export restrictions
If you decide to use Oracle…
You must follow the following restrictions:
1. You must not be a terrorist or Communist:
“You are not a citizen, national, or resident of, and are not under control of, the government of Cuba, Iran, Sudan, Libya, North Korea, Syria, nor any country to which the United States has prohibited export.”
2. You cant be friends or business partners with Communists or Terrorists:
“You will not download or otherwise export or re-export the Programs, directly or indirectly, to the above mentioned countries nor to citizens, nationals or residents of those countries.”
3. You cannot be a felon/national/trafficker of the type:
“You are not listed on the United States Department of Treasury lists of Specially Designated Nationals, Specially Designated Terrorists, and Specially Designated Narcotic Traffickers, nor are you listed on the United States Department of Commerce Table of Denial Orders.”
4. You can’t make nuclear or biological weapons with it:
“You will not use the Programs for, and will not allow the Programs to be used for, any purposes prohibited by United States law, including, without limitation, for the development, design, manufacture or production of nuclear, chemical or biological weapons of mass destruction.”
5. You can only use it for one-time development of a prototype of your application:
“use the programs for your own internal data processing or for any commercial or production purposes, or use the programs for any purpose except the development of a single prototype of your application”
6. You can’t train your employees who are helping you build your application:
[you cannot] “use the programs to provide third party training”
7. You can’t tell anyone how “fast” your program runs with the Oracle database:
[you may not] “disclose results of any program benchmark tests without our prior consent”
Site URL: Oracle TOS - Export Restrictions
Sphere: Related Content
























