Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $bgcolor = "222222" ;
- $imgsrc = "php.png" ;
- $lastcolor = $bgcolor ;
- $img = imagecreatefrompng($imgsrc) ;
- $imgsize = getimagesize($imgsrc) ;
- $lines = array() ;
- $lines[] = "PHPwasconceivedsometimeinthefallof1994byRasmusLerdorf.Earlynon-releasedversionswereusedonhishom" ; # S
- $lines[] = "epagetokeeptrackofwhowaslookingathisonlineresume.Thefirstversionusedbyotherswasavailablesometim" ; # q
- $lines[] = "einearly1995andwasknownasthePersonalHomePageTools.Itconsistedofaverysimplisticparserenginethato" ; # u
- $lines[] = "nlyunderstoodafewspecialmacrosandanumberofutilitiesthatwereincommonuseonhomepagesbackthen.Agues" ; # e
- $lines[] = "tbook,acounterandsomeotherstuff.Theparserwasrewritteninmid-1995andnamedPHP/FIVersion2.TheFIcame" ; # a
- $lines[] = "fromanotherpackageRasmushadwrittenwhichinterpretedhtmlformdata.HecombinedthePersonalHomePagetoo" ; # l
- $lines[] = "lsscriptswiththeFormInterpreterandaddedmSQLsupportandPHP/FIwasborn.PHP/FIgrewatanamazingpaceand" ; # e
- $lines[] = "peoplestartedcontributingcodetoit.Itisdifficulttogiveanyhardstatistics,butitisestimatedthatbyla" ; # r
- $lines[] = "te1996PHP/FIwasinuseonatleast15,000websitesaroundtheworld.Bymid-1997thisnumberhadgrowntoover50," ;
- $lines[] = "000.Mid-1997alsosawachangeinthedevelopmentofPHP.ItchangedfrombeingRasmus'ownpetprojectthatahand" ;
- $lines[] = "fulofpeoplehadcontributedto,tobeingamuchmoreorganizedteameffort.Theparserwasrewrittenfromscratc" ;
- $lines[] = "hbyZeevSuraskiandAndiGutmansandthisnewparserformedthebasisforPHPVersion3.Alotoftheutilitycodefr" ;
- $lines[] = "omPHP/FIwasportedovertoPHP3andalotofitwascompletelyrewritten.Today(mid-1999)eitherPHP/FIorPHP3s" ;
- $lines[] = "hipswithanumberofcommercialproductssuchasC2'sStrongHoldwebserverandRedHatLinux.Aconservativeest" ;
- $lines[] = "imatebasedonanextrapolationfromnumbersprovidedbyNetCraftwouldbethatPHPisinuseonover150,000sites" ;
- $lines[] = "aroundtheworld.Toputthatinperspective,thatismoresitesthanrunNetscape'sflagshipEnterpriseservero" ;
- $lines[] = "ntheInternet.Alsoasofthiswriting,workisunderwayonthenextgenerationofPHP,whichwillutilizethepowe" ;
- $lines[] = "rfulZendscriptingenginetodeliverhigherperformance,andwillalsosupportrunningunderwebserversother" ;
- $lines[] = "thanApacheasanativeservermodule.PHPwasconceivedsometimeinthefallof1994byRasmusLerdorf.Earlynon-" ;
- $lines[] = "releasedversionswereusedonhishomepagetokeeptrackofwhowaslookingathisonlineresume.Thefirstversio" ;
- $lines[] = "nusedbyotherswasavailablesometimeinearly1995andwasknownasthePersonalHomePageTools.Itconsistedof" ;
- $lines[] = "averysimplisticparserenginethatonlyunderstoodafewspecialmacrosandanumberofutilitiesthatwereinco" ;
- $lines[] = "mmonuseonhomepagesbackthen.Aguestbook,acounterandsomeotherstuff.Theparserwasrewritteninmid-1995" ;
- $lines[] = "andnamedPHP/FIVersion2.TheFIcamefromanotherpackageRasmushadwrittenwhichinterpretedhtmlformdata." ;
- $lines[] = "HecombinedthePersonalHomePagetoolsscriptswiththeFormInterpreterandaddedmSQLsupportandPHP/FIwasb" ;
- echo "<html>\n<head>\n<title>Squealer's homepage</title>\n</head>\n<body bgcolor='" . $bgcolor . "'>\n<pre>\n<center>\n<font color='#" . $bgcolor . "'>" ;
- for($a = 0 ; $a < count($lines) ; $a++) { # S
- for($b = 0 ; $b < strlen($lines[$a]) ; $b++) { # q
- $x = round($imgsize[0] * $b / (strlen($lines[$a]))) ; # u
- $y = round($imgsize[1] * $a / (count($lines))) ; # e
- $arr = imagecolorsforindex($img, imagecolorat($img, $x, $y)) ; # a
- $arr["red"] = $arr["red"] - ($arr["red"] - hexdec(substr($bgcolor, 0, 2))) * $arr["alpha"] / 127 ; # l
- $arr["green"] = $arr["green"] - ($arr["green"] - hexdec(substr($bgcolor, 2, 2))) * $arr["alpha"] / 127 ; # e
- $arr["blue"] = $arr["blue"] - ($arr["blue"] - hexdec(substr($bgcolor, 4, 2))) * $arr["alpha"] / 127 ; # r
- $color = dechex($arr["red"]) . dechex($arr["green"]) . dechex($arr["blue"]) ;
- /*S*/ if($lastcolor != $color) {
- /*q*/ echo "</font><font color='#" . $color . "'>" ;
- /*u*/ }
- /*e*/ echo substr($lines[$a], $b, 1) . "" ;
- /*a*/ $lastcolor = $color ;
- /*l*/}
- /*e*/$lastcolor = $bgcolor ;
- /*r*/echo "</font>\n<font color='#" . $bgcolor . "'>" ;
- }
- echo "</font>\n</center>\n</pre>\n</body>\n</html>" ;
- ?>
Add Comment
Please, Sign In to add comment