WordPress.org

Ready to get started?Download WordPress

Forums

Google query listing hack (27 posts)

  1. bdjohns1
    Member
    Posted 11 years ago #

    I see from the referer log a lot of people have visited the site looking at this, but has anyone looked at the code for saneness and/or tried it on their own site? I'd like to make sure it isn't just a hack that works on my setup.

  2. Cena
    Member
    Posted 11 years ago #

    I don't know if it's just me, but your right hand column is cut off in my browser (IE 6 Win)..in other words, where it obviously says 'WordPress' at the top, I see 'rdPress' (and everything below is similarly truncated.)

  3. bdjohns1
    Member
    Posted 11 years ago #

    Yeah, I've noticed that tends to happen a lot with people who have narrow browser windows. I don't really want to go with smaller text in the center column, and the z-ordering is set so that the content section will run over the right-hand bar. It works fine at 1024x768, and last time I looked at 800x600, it seemed to be ok.

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    Hi,
    Ben's download link is not working. Can anyone post a working link?

  5. davidchait
    Member
    Posted 10 years ago #

    I have an overhauled version of his code with a blacklist file, but it's not cleaned up yet (it uses some custom code from my site). Let me see if I can clean it up this weekend.
    -d
    http://www.chait.net

  6. OperaManiac
    Member
    Posted 10 years ago #

    why not use this readymade package?
    http://www.textism.com/tools/refer/

  7. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Or this one:
    http://poeticpollution.net/scripts/ufp/
    User Fingerprints - excellent script. If he's not made it xhtml compliant yet (I supplied the details to him a while back) it's easy enough.

  8. OperaManiac
    Member
    Posted 10 years ago #

    hey podz can u show me a result page of that hack?

  9. davidchait
    Member
    Posted 10 years ago #

    My enhanced version of Ben's system has a full blacklist system to ignore (and report back to the caller) blacklisted IPs or source domains. I haven't gotten spam coming through in months, since I caught the last few people trying to blast sites.
    I've also enhanced the google/search-term functions to be able to handle more searchers, and direct-call body to output google-list or referrer-list in a page for admins to see larger histories than you want in the sidebar.
    As I said, I'll look into whether I can quickly clean it up this weekend -- should only be a few helper functions being pulled in.
    -d
    http://www.chait.net

  10. davidchait
    Member
    Posted 10 years ago #

    I've posted the updated cg-referer file up on my website if people want to grab it. It'd be good to get some other people using/testing it and get some feedback.
    I can't promise I got all the CHAITGEAR dependencies out, but think I got most of them. ;)
    You can download it at:
    http://www.chait.net/index.php?p=86
    Updated features (some of them):
    - referrals from inside your site are (default) tossed.
    - blank (or internal) referrals MAY be added, IF a flag/param is set to track daily unique IPs, AND the user's IP is in fact unique for the day.
    - blacklist features, for preventing certain sites or IPs getting into the refer list.
    - bot-catching filter, for blocking bots and such from hitting the refer list.
    - a bunch of stats-printing functions by passing a param in the URL, security-level locked of course. also one for clearing the list of blacklisted sites, for cleaning up when new blacklisted sites are added...
    - recent-search-term function now parses a bunch of different search providers, and has generic fallbacks. and cleans up the output.
    -d

  11. Anonymous
    Unregistered
    Posted 10 years ago #

  12. Beel
    Member
    Posted 10 years ago #

    Well David (and Ben), I implemented the hack but now I have to wait for some data to hit the table as it craps out otherwise. I dummied up a visit just to see if it works and it appears to do so. I'll have to delete the calls until I get some hits so I will get back to you.

  13. davidchait
    Member
    Posted 10 years ago #

    Beel - what is 'crapping out'? It shouldn't, but I might not have checked for a null result in one of the functions that I'm not calling. Let me know, and I'll try to whip up a fix for you.
    -d
    http://www.chait.net

  14. Beel
    Member
    Posted 10 years ago #

    As I recall, it craps out when post or page has no referers (and permalinks screw it up, too) with the old "invalid argument supplied for each...." You could also remove the BRs in the calls as it appears you have them nicely in each function (well, not nicely, as you have BR instead of br / ;-)
    Hit my site now as I have topRefererList set for a bit and I don't have many hits (but will change to "global" after you do).
    As for permalinks, you can check
    /index.php?p=16 will work
    /archives/2003/12/17/saddam-lookalike/ will not.

  15. davidchait
    Member
    Posted 10 years ago #

    Thanks for the update... I'll go take a look.
    -d

  16. davidchait
    Member
    Posted 10 years ago #

    I've cleaned up the br's to be proper-like. ;)
    I double checked code, cleaned up some things, tried some debug printouts, and spent two hours getting my local machine to run clean in rewrite-mode (my ISP won't, so never have tested), and I've seen no cases of the foreach-arg error in my error trapping output. If you have a particular case, in a particular function, that it is occurring, definitely let me know as I can't find it! I've made sure that all foreach statements have an if test to detect an empty array just beforehand.
    New tweaked version of the cg-referrer stuff is being packed up now. Still at:
    http://www.chait.net/index.php?p=86
    Let me know if other issues come up. Thanks!
    -d

  17. Beel
    Member
    Posted 10 years ago #

    It is late and I am too tired to look into it tonight, but maybe I'll have time tomorrow. Those two partial addresses above to:
    http://www.billhayes.us/wordpress/index.php?p=16 (works)
    http://www.billhayes.us/wordpress/archives/2003/12/17/saddam-lookalike/ (error)
    http://www.billhayes.us/wordpress/index.php?paged=4 (error)
    should give you an example of what I mean, at list for topRefererList(5)
    I will use the "global" so it is really not that important to me other than I grew up on crosswords and puzzles so figuring it out is in my blood!

  18. davidchait
    Member
    Posted 10 years ago #

    I just hit those three pages, and saw no problems with the referer list. Dunno. If you figure something out, or can get the specific error (and line and file), I'm ready and able to take a look. ;)
    -d

  19. Beel
    Member
    Posted 10 years ago #

    That is because I switched it back to "global" - sorry you didn't get there sooner, I thought you had. If you want, e-mail me at BoulderBill (and that would be at comcast.net) and we can discuss it some more. I haven't had the time to get into it but if you have checked for a null result, I doubt if I will be able to figure it out.

  20. Anonymous
    Unregistered
    Posted 10 years ago #

    Yeah, try the latest zip from my site (http://www.chait.net/index.php?p=86), and let me know if you still have problems. Maybe I fixed it since you grabbed your copy? Dunno.
    I just switched over to nice URLs at home, had no problems with that or paged= links. I cleaned up a few Notice level error notes, but no foreach warning or other 'more major' errors. And that was not-'global'.
    -d

  21. davidchait
    Member
    Posted 10 years ago #

    (Yes, that was me. Site keeps 'forgetting' me.... darn it...)

  22. Beel
    Member
    Posted 10 years ago #

    David, we should figure out a way to have a blacklist file we can all update. I am not too fond of things like "www.nudecelebblogs.com" and "www.amateurxpass.com" being associated with my site in any way, shape or form, whether visible or not!

  23. davidchait
    Member
    Posted 10 years ago #

    well, it has to be in a file somewhere! ;)
    It could be encoded somehow, but that makes it harder to edit. a raw data file would work too, which might not be directly-loadable from the web. However, I could just add the admin-security check stuff to the top of the blacklist file(s), so that they can't be direct-included.
    It would be nice to have a maintained list somewhere. I'm just updating my referrer blacklist, and comments blacklist, as I get people spamming me. I only just got a new comment spammer hit me, and I nailed it pretty quickly. Only the repeated offenders get into the IP blacklist (they have to be coming from a dedicated IP... and even then they can end up losing the IP at some point -- I don't like IP blacklisting, but it's easier than letting some of the heavyweight spammers just change the domain they spam for...)
    -d
    http://www.chait.net

  24. davidchait
    Member
    Posted 10 years ago #

    I'll probably publish my list every now and then anyway. If people want to use the mail form in my About section to send me new items (please send all the info, like the entire comment notification email or all the referrer entry fields), I'll progressively add them into the list(s). At some point, I'm sure they will look at adding these things as more 'core' plugins for WP and we can maintain the active list through the wiki or a spam submission database.
    FYI, if it wasn't clear, you can add new entries to the referrer blacklist, then do:
    <yoursiteurl>/refererLib.php?flush=1
    That will open a new window that will dump output as the script 'scrubs' the referer table/database of all blacklisted entries. Good if you've been spammed (and not noticed it) over a few weeks, just add all the entries in, and clean the bad stuff out...
    -d
    http://www.chait.net

  25. davidchait
    Member
    Posted 10 years ago #

    Just FYI, this thread got a bit 'off base' from the original topic, but wanted people to know I've continued to update the refererLib code. Fixed a few bugs, added some more helper funcs, revised the daily listing output, and continue to enhance the simple 'doc'.
    You can still grab it from:
    http://www.chait.net/index.php?p=86
    -d

  26. Beel
    Member
    Posted 10 years ago #

    Thanks David, I updated mine but forgot to check if you made any changes to the table. Do I need to delete the table and recreate it?

  27. davidchait
    Member
    Posted 10 years ago #

    Yeah, I did. I finally made the columns varchars, as there was gigs of wasted space otherwise... ;)
    You can go in manually with a admin program and change the columns to be varchars yourself, should work. Or you can start from scratch if you don't have useful info accumulated.
    d

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.