WordPress.org

Support

Support » How-To and Troubleshooting » HELP!: Log what pages are being viewed by users

HELP!: Log what pages are being viewed by users

  • Okay, I installed the plugin “PHP Exec” so that I can post PHP on my blog. It works great. So far I have gotten it to post who the user is and what time they access the page I placed this script in, but right now I can’t get the name of the page they are viewing to go along with it (and I don’t want to have to manually do it for each- what a headache.)

    —–code start——-

    <phpcode>
    <?php
    $stufftolog = the_title();
    $file = ‘titleofpost.php’;
    $file = fopen($file, ‘a’);
    fwrite($file, $stufftolog);
    fclose($file);
    ?>
    </phpcode>

    —–code end—–

    It runs and outputs the name of the post, but nothing in the file. Any ideas guys?

  • The topic ‘HELP!: Log what pages are being viewed by users’ is closed to new replies.
Skip to toolbar