Hey RZ,
Recently I noticed all Habboon referal requests for Habbo Avatars were being forbidden by Habbo Servers, so I decided to create a script to get around it.
Firstly I thought saving the image and reading it was a good idea..
But then after three days we ended up with 55k images, so I thought reading them directly from Habbo.com was the best idea.Code:<cfif IsDefined("url.figure")> <cfset thisAvatarSize = ""> <cfset thisAvatarSizeName = ""> <cfif IsDefined("url.size")> <cfset thisAvatarSize = "s"> <cfset thisAvatarSizeName = "-small"> </cfif> <!-- Gather Path --> <cfset thisPath = ExpandPath("*.*")> <cfset thisAvatar = GetDirectoryFromPath(thisPath) & url.figure & #thisAvatarSizeName# & ".gif"> <cfif NOT FileExists(thisAvatar)> <cfhttp method="get" url="http://www.habbo.com/habbo-imaging/a...thisAvatarSize#" useragent="#CGI.http_user_agent#" getasbinary="yes" result="objGET"> <cfhttpparam type="HEADER" name="referer" value="http://habbo.com/Home/HeyGuys-ItsShorty"/> </cfhttp> <cfif FindNoCase( "200", objGET.StatusCode )> <cffile action="write" file="#ExpandPath( './#url.figure##thisAvatarSizeName#.gif' )#" output="#objGET.FileContent#" /> </cfif> </cfif> <cffile action="READBINARY" file="#thisAvatar#" variable="AvatarImage"> <cfcontent variable="#AvatarImage#" > </cfif>
Use as you wish..Code:<cfif IsDefined("url.figure")> <cfset thisAvatarSize = ""> <cfset thisAvatarDirection = "2"> <cfset thisAvatarHeadDirection = "2"> <cfset thisAvatarAction = ""> <cfset thisAvatarGesture = ""> <cfif IsDefined("url.size")> <cfset thisAvatarSize = "s"> </cfif> <cfif IsDefined("url.direction")> <cfset thisAvatarDirection = url.direction> </cfif> <cfif IsDefined("url.head_direction")> <cfset thisAvatarHeadDirection = url.head_direction> </cfif> <cfif IsDefined("url.action")> <cfset thisAvatarAction = url.action> </cfif> <cfif IsDefined("url.gesture")> <cfset thisAvatarGesture = url.gesture> </cfif> <cfhttp method="get" url="http://www.habbo.com/habbo-imaging/a...sAvatarGesture#" useragent="#CGI.http_user_agent#" timeout="5" getasbinary="yes" result="objGET"> <cfhttpparam type="HEADER" name="referer" value="http://habbo.com/Home/HeyGuys-ItsShorty"/> </cfhttp> <cfcontent variable="#objGet.FileContent#"> </cfif>






