A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [MX04] Figure out how to make this code work in my flash 7 files.

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    2

    [MX04] Figure out how to make this code work in my flash 7 files.

    //this is a code to ensure flash is only played on my server as a security measure. I would like to use it but I am not able to really implement this for my flash. Would like a consultant.

    PHP Code:
    sStolen = function(ourDomainName){
            var 
    protocolurlStringpart1part2part3part4domain;

            
    //Get the current url
            
    urlString _root._url;

            
    protocol urlString.substr(0urlString.indexOf(":"));

            
    //if we are on the internet.. do the check
            
    if (protocol == "http") {
                    
    /*get everything between the "://"
                    and the next "/"*/
                    
    part1=urlString.indexOf("://")+3;
                    
    part2=urlString.indexOf("/"part1);
                    
    domain=urlString.substring(part1,part2);

                    
    //throw away any prefixes of "."
                    
    part3=domain.lastIndexOf(".")-1;
                    
    part4=domain.lastIndexOf("."part3)+1;
                    
    domain=domain.substring(part4domain.length);
                    
    //Do the right thing!
                    
    if(domain != ourDomainName){
                            return(
    true);
                    }
    //End if
            
    }//End if

    }//End function

    //Do a check for theives..send them to your page
    if (isStolen("yourDomain.com")) {
            
    getUrl("****off.htm");
            return;
    } else {

            
    delete(isStolen);
    }
    //End if 

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    The title of your thread was misleading, no job offerings are permitted in this forum. Title was edited.
    It's also suggested you use PHP tags when posting code samples. Your thread was also edited.
    Please read this forum's guidelines prior to posting here.

    You're missing an i in the function name: isStolen.

    gparis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center