How can I enscript/change this code?

Discussion in 'Programming' started by superman1, Aug 4, 2012.

  1. #1
    Hi guys, I have this code that is hidden from people but I think robots and some software can still read it on the page. Is there a way to make it hard to read for robots or unwanted software?

    
    
    <?php if(!$is_reported) { ?><b><?php echo  $lang['REPORT_THIS_AD']; ?></b> <a  href="javascript:confirmAbuseReport();"><?php echo  $lang['REPORT_ABUSE_SPAM']; ?></a> 
    
    
    PHP:

    Thanks!
     
    superman1, Aug 4, 2012 IP
  2. Alejandro131

    Alejandro131 Greenhorn

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    3
    Trophy Points:
    21
    #2
    When you put some code on your page it is readable by anything, no matter human or software program as it is in the page source, where everybody can view it.

    Hiding it visually will make it invisible to the user, but the robots will still see the code that you are echoing.

    On the other hand robots aren't smart enough to interpret javascript functions and what they do, they are made to scan your page for relevant content and index it, so as long as it is javascript you're good to go.

    If you really don't want robots to view your code, you should actually have your page link placed in your robots.txt, with the required setting for it to not be indexed and the robots will not view anything on your page.
     
    Alejandro131, Aug 4, 2012 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    There's really nothing in that code that needs to be hidden. If some of it points to a function that holds your email address, that needs to be hidden, but there are a lot of different techniques on the web to do that in Javascript (or you can just have the email sent in PHP).
     
    Rukbat, Aug 11, 2012 IP