Adilol

Shorty's implementation

Oct 18th, 2011
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cfif IsDefined("url.figure")>
  2. <cfset thisAvatarSize = "">
  3. <cfset thisAvatarSizeName = "">
  4. <cfif IsDefined("url.size")>
  5.  <cfset thisAvatarSize = "s">
  6.  <cfset thisAvatarSizeName = "-small">
  7. </cfif>
  8. <!-- Gather Path -->
  9. <cfset thisPath = ExpandPath("*.*")>
  10. <cfset thisAvatar = GetDirectoryFromPath(thisPath) & url.figure & #thisAvatarSizeName# & ".gif">
  11. <cfif NOT FileExists(thisAvatar)>
  12.  <cfhttp method="get" url="http://www.habbo.com/habbo-imaging/a...thisAvatarSize#" useragent="#CGI.http_user_agent#" getasbinary="yes" result="objGET">
  13.   <cfhttpparam type="HEADER" name="referer" value="http://habbo.com/Home/HeyGuys-ItsShorty"/>
  14.  </cfhttp>
  15.  <cfif FindNoCase( "200", objGET.StatusCode )>
  16.   <cffile action="write" file="#ExpandPath( './#url.figure##thisAvatarSizeName#.gif' )#" output="#objGET.FileContent#" />
  17.  </cfif>
  18. </cfif>
  19. <cffile action="READBINARY" file="#thisAvatar#" variable="AvatarImage">
  20. <cfcontent variable="#AvatarImage#" >
  21. </cfif>
  22.  
Advertisement
Add Comment
Please, Sign In to add comment