1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

HTML Encoding?!

Discussion in 'PHP' started by redhits, Sep 18, 2007.

  1. #1
    What's the PHP html encoding function name?!


    Like javascript do this...
    I want to known how i can encrypt the a string=Aloka to something like this %41%6C%6F%6B%61 in php

    <Script Language='Javascript'>
    <!-- HTML Encryption provided by iWEBTOOL.com -->
    <!--
    document.write(unescape('%41%6C%6F%6B%61'));
    //-->
    </Script>
    SEMrush
     
    redhits, Sep 18, 2007 IP
    SEMrush
  2. omgitsfletch

    omgitsfletch Well-Known Member

    Messages:
    1,222
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    145
    #2
    urlencode($string);
    PHP:
    That will only encode special characters though (i.e. non alphanumeric). Can't recall any function that will encode ALL characters. Is that really necessary?
     
    omgitsfletch, Sep 18, 2007 IP
    guerilla likes this.
  3. redhits

    redhits Notable Member

    Messages:
    3,023
    Likes Received:
    277
    Best Answers:
    0
    Trophy Points:
    255
    #3
    yes it's really necesary
     
    redhits, Sep 18, 2007 IP
  4. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    "really necessary" as in "I just want it to take another minute or two to copy my data while making the site entirely useless for search engines", right?

    That kind of protection stops only the dumbest of users.
     
    TwistMyArm, Sep 18, 2007 IP
  5. omgitsfletch

    omgitsfletch Well-Known Member

    Messages:
    1,222
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    145
    #5
    If obfuscation is your goal, then it's true, it really isn't worth the trouble. It's HTML code, get over it, it's out there. It isn't worth the gain of obfuscating it for the loss of readability for search engines. If you really want to make it difficult for people, at least make up your own homebrew encryption with PHP to make it somewhat worthwhile, not something that can be solved as quickly as a urldecode($string) command.
     
    omgitsfletch, Sep 18, 2007 IP