PHP Classes available again
All the old PHP stuff is available again. Have fun.
- AccessDBM-1_1.tar.gz
- ConfigReader-1_3.tar.gz
- FastTemplate-1_1_0.tar.gz
- File-1_0.tar.gz
- Htgroup-0_4.tar.gz
- Htpasswd-0_9.tar.gz
- Logger-1_0.tar.gz
- PHP-RSS-0.91.tar.gz
- POP3-1_0.tar.gz
- Validator-1_2.tar.gz
Leave a Comment
If you would like to make a comment, please fill out the form below.
How can a windows user open the tar.gz files?
I have not found a way.
Bob
Thank you for making this available again!
I’m a student and was going through an interactive tutorial that cites these templates as a starting point, and I was worried that they were no longer available since the tutorial was dated (5 years old).
I read about your issues with your former employer and am glad that you’re past that.
More power to you!
Use Winrar.
WinRar will open gziped tar files
use winrar in windows
I’ve made soma modifications to support SHA and MD5 passwords by class.htpasswd. Diff looks like below:
[code]
27a28,53
> Rev 0.9a +cryptMD5Pass()
>
> Added recognition of SHA and MD5 passwords
> as generated by htpasswd program:
> - "{SHA}" - htpasswd -s
> - "$apr1$" - htpasswd -m
>
> Functions: cryptPass(), changePass(),
> addUser() and assignPass()extended by $hash
> parameter to change default CRYPT algorithm
> to SHA or MD5/APR1
>
> example:
>
> cryptPass($pass,$salt,"sha")
> changePass($user,$pass,$oldpass,"md5")
> ...
>
> 0.9 can be safely changed to 0.9a, all
> functiond without additional $hash parameter
> works like in 0.9
>
> **************************************************************
>
> **************************************************************
>
169c195
var $VERSION = 'Revision 0.9a 2008/09/30 10:20:00 cdi@thewebmasters.net';
463c491
function cryptPass ($passwd, $salt = "", $hash = "crypt")
479,480c507,523
<
> if (($hash == "sha") || ($hash == "md5")) {
>
> if ($hash == "sha") {
>
> return ("{SHA}".base64_encode(pack("H*",sha1($passwd))));
>
> }
>
> if ($hash == "md5") {
>
> return ($this->cryptMD5Pass($passwd,$salt));
>
> }
>
> }
> else // if $hash != (crypt || sha || md5) then $hash = crypt ...
481a525,527
>
> if (!empty($salt))
> {
485,487c531,533
< }
< else
}
> else
> {
491c537
}
493c539,541
return (crypt($passwd, $salt));
>
> }
586,587c634,651
< $salt = substr($pass,0,2);
cryptPass($Pass,$salt);
---
>
> if (substr($pass,0,5) == "{SHA}") // SHA ?
> {
> $Pass = $this->cryptPass($Pass,"","sha");
> }
> else
> {
> if (substr($pass,0,6) == '$apr1$') // MD5 ?
> {
> $salt = substr($pass,6,8);
> $Pass = $this->cryptPass($Pass,$salt,"md5");
> }
> else // ...so we think that the Crypt is used
> {
> $salt = substr($pass,0,2);
> $Pass = $this->cryptPass($Pass,$salt,"crypt");
> }
> }
611c675
function changePass ($UserID, $newPass, $oldPass = "", $hash = "crypt")
680,681c744,746
USERS[$usernum]["pass"] = $this->cryptPass($newPass);
> $this->USERS[$usernum]["pass"] = $this->cryptPass($newPass,"",$hash);
>
871c936
function addUser ($UserID, $newPass, $hash = "crypt")
902,903c967,968
<
USERS[$count]["pass"] = $this->cryptPass($newPass);
---
>
> $this->USERS[$count]["pass"] = $this->cryptPass($newPass,"",$hash);
923c988
function assignPass ($UserID, $hash = "crypt")
951c1016
USERS[$count]["pass"] = $this->cryptPass($pass);
---
> $this->USERS[$count]["pass"] = $this->cryptPass($pass,"",$hash);
1081a1147,1196
> // **************************************************************
> // Generates the password as a result of an Apache-specific algorithm
> // using an iterated (1,000 times) MD5 digest of various combinations
> // of a random 32-bit salt and the password.
>
>
> function cryptMD5Pass($plainpasswd,$salt="") {
>
> if ($salt == "")
> {
> // if no $salt is given...
> $salt = substr(str_shuffle("./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"), 0, 8);
> }
>
> $len = strlen($plainpasswd);
> $text = $plainpasswd.'$apr1$'.$salt;
> $bin = pack("H32", md5($plainpasswd.$salt.$plainpasswd));
>
> for($i = $len; $i > 0; $i -= 16) {
> $text .= substr($bin, 0, min(16, $i));
> }
>
> for($i = $len; $i > 0; $i >>= 1) {
> $text .= ($i & 1) ? chr(0) : $plainpasswd{0};
> }
>
> $bin = pack("H32", md5($text));
>
> for($i = 0; $i $new = ($i & 1) ? $plainpasswd : $bin;
> if ($i % 3) $new .= $salt;
> if ($i % 7) $new .= $plainpasswd;
> $new .= ($i & 1) ? $bin : $plainpasswd;
> $bin = pack("H32", md5($new));
> }
>
> for ($i = 0; $i $k = $i + 6;
> $j = $i + 12;
> if ($j == 16) $j = 5;
> $tmp = $bin[$i].$bin[$k].$bin[$j].$tmp;
> }
>
> $tmp = chr(0).chr(0).$bin[11].$tmp;
> $tmp = strtr(strrev(substr(base64_encode($tmp), 2)),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
> return "$"."apr1"."$".$salt."$".$tmp;
>
> }
>
[/code]
Try ZipGenius. It’ll do about everything.
Try going open source.
Use 7-zip, it will open anything.
Hi!
I’m interested in the Htpasswd class, but the file is a .php3, it will work under php 4 or 5?
Thanks!
Dear Sir,
Where Can I find How to use class.POP3.php
[...] this part of the project, we will use FastTemplate to help us put everything together quickly. There are better PHP template frameworks out there, [...]
Thank you for making this available again!
[...] this part of the project, we will use FastTemplate to help us put everything together quickly. There are better PHP template frameworks out there, [...]