Inserting code when discovering a word

Discussion in 'PHP' started by login, Oct 28, 2007.

  1. #1
    Can I use php in some way to insert text in an url when the page is loading. My problem is that I bought a script that is encoded with ioncube.
    In the footer of the page there is a tracker to statcounter.com witch is inserted by the ioncube code.
    I want to prevent the site to be tracked by the script seller as it is non of his business to track my site.
    So what I want to do is to insert text in the statcounter.com link, something like statcounterxxx.com to stop the tracking.
     
    login, Oct 28, 2007 IP
  2. Fash

    Fash Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you edit the file that it is located in? If so, just remove it from the footer. However, if it's in ionCube's Terms of Service, I would be careful about removing it.
     
    Fash, Oct 28, 2007 IP
  3. login

    login Notable Member

    Messages:
    8,849
    Likes Received:
    349
    Best Answers:
    0
    Trophy Points:
    280
    #3
    Thanks Fash, I can edit the file yes, but I cant remove it because its encoded together with other stuff so I dont know what is what.
    Ioncube would not care about this, it is a script bought from a 3rd party.
     
    login, Oct 28, 2007 IP
  4. gota

    gota Peon

    Messages:
    20
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just use the ob_ function list, grab all the content, then str_replace to alter the tracker code. I don't see a problem with removing or altering a third party a tracker, but if it's pointing to the script developers site then you should ask them to remove it.


    <?php
    
    // top of the script, or htaccess perpend file
    
    ob_start ();
    
    // start script code
    
    echo 'this is just some junk!';
    
    // end script code
    
    // bottom of the script, or htaccess append file
    
    $data = ob_get_contents ();
    
    ob_end_clean ();
    
    $data = str_replace ( 'junk', 'text', $data );
    
    echo $data;
    
    ?>
    PHP:
     
    gota, Oct 28, 2007 IP
  5. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #5
    It is against the TOS of ionCube, you should contact the developer directly.
     
    krakjoe, Oct 28, 2007 IP
  6. login

    login Notable Member

    Messages:
    8,849
    Likes Received:
    349
    Best Answers:
    0
    Trophy Points:
    280
    #6
    Hmm. I am not sure that changing the output code after it is prosessed by ioncube is against their TOS. The ioncube code will not be altered, it is the content that is decoded by ioncube that will be altered.
     
    login, Oct 28, 2007 IP
  7. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #7
    Any modifications to encoded files is pretty clear, without limitation clarifies it further and strictly forbidden finishes it off nicely.
     
    krakjoe, Oct 29, 2007 IP
  8. login

    login Notable Member

    Messages:
    8,849
    Likes Received:
    349
    Best Answers:
    0
    Trophy Points:
    280
    #8
    Yes it does. :D But actually I cant alter the encoded file anyway, it will be corrupted if i try. So it must be sometihng from outside that change the output, not the file. But the problem is solved anyway, I will not use that script.
     
    login, Oct 29, 2007 IP