daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $bgcolor = "222222" ;
  4. $imgsrc = "php.png" ;
  5. $lastcolor = $bgcolor ;
  6.  
  7. $img = imagecreatefrompng($imgsrc) ;
  8. $imgsize = getimagesize($imgsrc) ;
  9.  
  10. $lines = array() ;
  11. $lines[] = "PHPwasconceivedsometimeinthefallof1994byRasmusLerdorf.Earlynon-releasedversionswereusedonhishom" ; # S
  12. $lines[] = "epagetokeeptrackofwhowaslookingathisonlineresume.Thefirstversionusedbyotherswasavailablesometim" ; # q
  13. $lines[] = "einearly1995andwasknownasthePersonalHomePageTools.Itconsistedofaverysimplisticparserenginethato" ; # u
  14. $lines[] = "nlyunderstoodafewspecialmacrosandanumberofutilitiesthatwereincommonuseonhomepagesbackthen.Agues" ; # e
  15. $lines[] = "tbook,acounterandsomeotherstuff.Theparserwasrewritteninmid-1995andnamedPHP/FIVersion2.TheFIcame" ; # a
  16. $lines[] = "fromanotherpackageRasmushadwrittenwhichinterpretedhtmlformdata.HecombinedthePersonalHomePagetoo" ; # l
  17. $lines[] = "lsscriptswiththeFormInterpreterandaddedmSQLsupportandPHP/FIwasborn.PHP/FIgrewatanamazingpaceand" ; # e
  18. $lines[] = "peoplestartedcontributingcodetoit.Itisdifficulttogiveanyhardstatistics,butitisestimatedthatbyla" ; # r
  19. $lines[] = "te1996PHP/FIwasinuseonatleast15,000websitesaroundtheworld.Bymid-1997thisnumberhadgrowntoover50," ;
  20. $lines[] = "000.Mid-1997alsosawachangeinthedevelopmentofPHP.ItchangedfrombeingRasmus'ownpetprojectthatahand" ;
  21. $lines[] = "fulofpeoplehadcontributedto,tobeingamuchmoreorganizedteameffort.Theparserwasrewrittenfromscratc" ;
  22. $lines[] = "hbyZeevSuraskiandAndiGutmansandthisnewparserformedthebasisforPHPVersion3.Alotoftheutilitycodefr" ;
  23. $lines[] = "omPHP/FIwasportedovertoPHP3andalotofitwascompletelyrewritten.Today(mid-1999)eitherPHP/FIorPHP3s" ;
  24. $lines[] = "hipswithanumberofcommercialproductssuchasC2'sStrongHoldwebserverandRedHatLinux.Aconservativeest" ;
  25. $lines[] = "imatebasedonanextrapolationfromnumbersprovidedbyNetCraftwouldbethatPHPisinuseonover150,000sites" ;
  26. $lines[] = "aroundtheworld.Toputthatinperspective,thatismoresitesthanrunNetscape'sflagshipEnterpriseservero" ;
  27. $lines[] = "ntheInternet.Alsoasofthiswriting,workisunderwayonthenextgenerationofPHP,whichwillutilizethepowe" ;
  28. $lines[] = "rfulZendscriptingenginetodeliverhigherperformance,andwillalsosupportrunningunderwebserversother" ;
  29. $lines[] = "thanApacheasanativeservermodule.PHPwasconceivedsometimeinthefallof1994byRasmusLerdorf.Earlynon-" ;
  30. $lines[] = "releasedversionswereusedonhishomepagetokeeptrackofwhowaslookingathisonlineresume.Thefirstversio" ;
  31. $lines[] = "nusedbyotherswasavailablesometimeinearly1995andwasknownasthePersonalHomePageTools.Itconsistedof" ;
  32. $lines[] = "averysimplisticparserenginethatonlyunderstoodafewspecialmacrosandanumberofutilitiesthatwereinco" ;
  33. $lines[] = "mmonuseonhomepagesbackthen.Aguestbook,acounterandsomeotherstuff.Theparserwasrewritteninmid-1995" ;
  34. $lines[] = "andnamedPHP/FIVersion2.TheFIcamefromanotherpackageRasmushadwrittenwhichinterpretedhtmlformdata." ;
  35. $lines[] = "HecombinedthePersonalHomePagetoolsscriptswiththeFormInterpreterandaddedmSQLsupportandPHP/FIwasb" ;
  36.  
  37. echo "<html>\n<head>\n<title>Squealer's homepage</title>\n</head>\n<body bgcolor='" . $bgcolor . "'>\n<pre>\n<center>\n<font color='#" . $bgcolor . "'>" ;
  38.  
  39. for($a = 0 ; $a < count($lines) ; $a++) { # S
  40.     for($b = 0 ; $b < strlen($lines[$a]) ; $b++) { # q
  41.         $x = round($imgsize[0] * $b / (strlen($lines[$a]))) ; # u
  42.         $y = round($imgsize[1] * $a / (count($lines))) ; # e
  43.         $arr = imagecolorsforindex($img, imagecolorat($img, $x, $y)) ; # a
  44.         $arr["red"] = $arr["red"] - ($arr["red"] - hexdec(substr($bgcolor, 0, 2))) * $arr["alpha"] / 127 ; # l
  45.         $arr["green"] = $arr["green"] - ($arr["green"] - hexdec(substr($bgcolor, 2, 2))) * $arr["alpha"] / 127 ; # e
  46.         $arr["blue"] = $arr["blue"] - ($arr["blue"] - hexdec(substr($bgcolor, 4, 2))) * $arr["alpha"] / 127 ; # r
  47.         $color = dechex($arr["red"]) . dechex($arr["green"]) . dechex($arr["blue"]) ;
  48. /*S*/   if($lastcolor != $color) {
  49. /*q*/       echo "</font><font color='#" . $color . "'>" ;
  50. /*u*/   }
  51. /*e*/   echo substr($lines[$a], $b, 1) . "" ;
  52. /*a*/   $lastcolor = $color ;
  53. /*l*/}
  54. /*e*/$lastcolor = $bgcolor ;
  55. /*r*/echo "</font>\n<font color='#" . $bgcolor . "'>" ;
  56. }
  57.  
  58. echo "</font>\n</center>\n</pre>\n</body>\n</html>" ;
  59.  
  60. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top