Anyone know how this decodes?

Discussion in 'PHP' started by grooveman, Jan 22, 2010.

  1. #1
    I have a wordpress blog that has this code in functions.php.

    The problem is that this theme keeps inserting a link into my blogroll. I take it out, and whenever I add a new edit something, the link reappears. I think it must have something to do with this code.

    Can someone decode it for me?

    Thanks a million!
     
    grooveman, Jan 22, 2010 IP
  2. Kaimi

    Kaimi Peon

    Messages:
    60
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=>'Sidebar'));
    
    add_action("edit_post","insert_theme_link");
    function insert_theme_link() {
    	global $wpdb;
    	if($wpdb->get_var("SELECT COUNT(link_id) FROM $wpdb->links WHERE link_url='http://www.propertywala.com'")==0)
    		wp_insert_link(array("link_name" => "India Property Buy", "link_url" => "http://www.propertywala.com" ));
    }
    ?> 
    
    PHP:
     
    Kaimi, Jan 22, 2010 IP
    grooveman likes this.
  3. strgraphics

    strgraphics Active Member

    Messages:
    710
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    hello Kaimi,

    how you decoded...., can you please tell me
     
    strgraphics, Jan 22, 2010 IP
  4. grooveman

    grooveman Peon

    Messages:
    595
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks Kaimi!
     
    grooveman, Jan 22, 2010 IP
  5. Kaimi

    Kaimi Peon

    Messages:
    60
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Replaced eval with echo
     
    Kaimi, Jan 22, 2010 IP
  6. Djkanna

    Djkanna Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I only have one thing to say (sorry it's rather off-topic sort-to-speak)

    Wordpress theme developers have really got to find a new way of encoding things I mean the encryption method is there to see.
    "base64_decode()" <= base64_encode()
     
    Djkanna, Jan 23, 2010 IP
  7. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #7
    Maybe, but I think they only want to encode it too prevent abuse against beginners. Someone who has a sound knowledge of php can easily decode it but people who have'nt can't decode it, which is why its encoded that way, to prevent the people who can't; from decoding it (due to abuse).
     
    danx10, Jan 23, 2010 IP