View php-password.php
<?php | |
function generatePassword($l = 8, $c = 0, $n = 0, $s = 0) { | |
// get count of all required minimum special chars | |
$count = $c + $n + $s; | |
// sanitize inputs; should be self-explanatory | |
if(!is_int($l) || !is_int($c) || !is_int($n) || !is_int($s)) { | |
trigger_error('Argument(s) not an integer', E_USER_WARNING); | |
return false; | |
} |
View randomimage2.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<!-- | |
Displaying A Random Image From A Directory Via PHP, Part 2 | |
Copyright 2007 Doug Vanderweide | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
View randomimage.php
<? | |
/* | |
Displaying A Random Image From A Directory Via PHP | |
Copyright 2007 Doug Vanderweide | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
View randomimage.php
<? | |
/* | |
Displaying A Random Image From A Directory Via PHP | |
Copyright 2007 Doug Vanderweide | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
View randomimage.php
<? | |
/* | |
Displaying A Random Image From A Directory Via PHP | |
Copyright 2007 Doug Vanderweide | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
View redirect.php
<? | |
if(isset($_POST['submit'])) { | |
$loc = "Location: " . $_POST['newPage']; | |
header($loc); | |
} | |
?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<!-- | |
Going To A New URL Via A Drop-Down List: JavaScript And DOM, PHP, ASP.NET |
View get_time.php
<? | |
/* | |
Syncronizing A Web Page's JavaScript Clock Via AJAX / DOM | |
Copyright 2007 Doug Vanderweide | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
View count_letters_in_string.php
<? | |
function getLetterCount($input) { | |
$letters = array(); | |
//make lowercase to simplify counting | |
$temp = strtolower(trim($input)); | |
//get length of string | |
$templen = strlen($temp); | |
View thumbnail.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<!-- | |
Showing A Larger Image From A Thumbnail OnClick Via JavaScript / DOM Revisited | |
Copyright 2008 Doug Vanderweide, dba Rescue-ME | |
http://www.dougv.com | |
Distributed under the Creative Commons Attribution / Share-Alike 2.5 License | |
http://creativecommons.org/licenses/by-sa/3.0/us/ | |
View iframe-thumbnail.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<!-- | |
Showing A Larger Image From A Thumbnail OnClick Via JavaScript / DOM Revisited | |
Copyright 2008 Doug Vanderweide, dba Rescue-ME | |
http://www.dougv.com | |
Distributed under the Creative Commons Attribution / Share-Alike 2.5 License | |
http://creativecommons.org/licenses/by-sa/3.0/us/ | |
NewerOlder