the last line in my footer.php is a call to an external script:
<?php @ include '/home/user/public_html/cgi-bin/myscript.php'; ?>
so myscript.php runs with each page view.
What I want to do is pass the current post name or page name with the script. Something like this:
<?php $viewed = get(post_name); @ include '/home/user/public_html/cgi-bin/myscript.php?id=$viewed'; ?>
The goal is to log all page views so I know which is most popular.
Is this possible? Any suggestions?
- The topic ‘How to get post/page name?’ is closed to new replies.