|
These are just some simple scripts that do simple things. Like most of the things on this planet, there are bits an pieces from other peoples ideas and work. If anything on this page looks like something you wrote, please let me know and I'll take it down. More will come with time.
|
A little utility. Ever type too long with the caps lock on? Ever want to make the nerd in your life hear screaming? This thing converts all characters to upper or lower case.
Open the thingy
|
<? ini_set("allow_url_fopen", "1");
$handle = fopen("http://www.google.com", "rb");
$contents = '';
while (!feof($handle)) {
$contents .= fread($handle, 8192);
}
fclose($handle);
echo $contents;
?>
|
More php... What this does is it will override some basic php.ini settings (the top line) then it reads in the file as a string. Then it echos the string. The nice part is then you can use a replace function on the string to remove or change bits and pieces. |
<?php
function directory($result) {
$handle=opendir(".");
while ($file = readdir($handle)) {
if ($file == "." || $file == "big" || is_file("$file")) { }
else { print "<a href=$file>$file</a><br>\n"; }
}
closedir($handle);
return $result;
}
echo directory($result);
?>
|
In php. Stick it on a page and you'll get a simple directory listing. This is used here. |
<?php
function images($result) {
$hhandle=opendir(".");
while ($file = readdir($hhandle)) {
if ($file == "." || $file == "..") { }
elseif (strstr($file, ".gif") || strstr($file, ".jpg")) { print "<a href=big/".$file." target=new><img src=".$file." border=1 hspace=11 vspace=11></a> "; }
}
closedir($hhandle);
return $result;
}
echo images($result);
?> |
I use this to display all the images in a directory and make them a link to a larger image, with the same name in a directory called "big". This is also used here. |
<a href="images.html" onMouseOver=huh.src="home_img.gif"> <img src="clear.gif" name="huh" width="250" height="315"></a> |
The easiest mouseover I've ever found. I use it on my home page. |
| |
More coming soon... probably. |