WordPress.org

Ready to get started?Download WordPress

Forums

referers (8 posts)

  1. gregz
    Member
    Posted 10 years ago #

    Hi there World,
    My first steps in PHP hacking.. I incorporated a PHP referes script into WordPress, you can see it live at http://www.tplace.org/
    Regards,
    Greg.

  2. gat
    Member
    Posted 10 years ago #

    this is interesting! ..but, useless until you don't share your code :) :) :) :)

  3. bdjohns1
    Member
    Posted 10 years ago #

    I've had one up for a while too, based on the ncyoung refererLib package. Code's here:
    http://www.ben-johnson.org/blog/refererLib.new.phps
    It also includes a function that'll keep track of who comes to your page via Google and displays the query strings they use to get there.
    The code on there is a little outdated - I'm migrating over to the current CVS version this weekend, and I'll be uploading a new copy with the following fixes:
    * Now uses WP's database connections, so you don't need to plug in your username, password, etc.
    * Code cleaned up
    Since we've got Smarty templates in CVS now, I'll get it turned into a plugin at some point soon.

  4. gregz
    Member
    Posted 10 years ago #

    this script I used can be found on http://jakez.net but I am going to have a good look at bdjohns script now.. looks better to me...
    Gregz

  5. bdjohns1
    Member
    Posted 10 years ago #

    Ok, I've uploaded the version with the updates decribed above. PHP source is now located at:
    http://www.ben-johnson.org/blog/refererLib.phps
    Enjoy, and let me know if you have any bug reports.
    (note - the database getting huge if you get thousands of hits a day is a feature, not a bug :) )

  6. jackiefg
    Member
    Posted 10 years ago #

    I copied the code and saved it as refererLib.php. Can someone tell me what code I would have to put elsewhere to have the referrers show up on my page?
    I'm looking to have something like "Last 5 Referrers" and then a list, but since I don't know php, I don't know what to put on my page to have it show up. Would it be include (refererLib.php)? and then the list would show?
    Thanks very much.

  7. seraph
    Member
    Posted 10 years ago #

    I get no output ;_;
    I have uploaded the referrerlib as referrers-include.php, and in referrers.php:
    <pre><?php
    $list = topRefererList(5,"global");
    foreach ($list as $link){
    print "

  8. ".$link."
  9. ";
    }</pre>
    No output though :/ Using WP from CVS (2 days old now)

  • Anonymous
    Unregistered
    Posted 10 years ago #

    ben: your installation instructions may be great for php geeks, but for those of us with lesser skills they are difficultto follow. I think there are steps you take for granted. My suggestion would be to try to write your instructions so a 12 year old could follow them.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.