Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
VinDSL
Life Cycles Becoming CPU Cycles



Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Thu Jan 20, 2005 2:58 am Reply with quote

Heh! This script is too much FUN! Dance-Y

Search bots 'hang' on my site 24/7. They never entirely leave. Sometimes there are a few, sometimes many. Right now, there are 200+ bots on my site...

Last week, when I started playing with this script, the bots found it almost immediately - although they didn't seem to care for it much. Why? Probably because the link wasn't SEO'ed. But, they indexed it, and it came up in the first 10 pages of Google for a 'bandwidth meter' search.

A couple of days later, I decided to change the module name. That normally wouldn't be a problem, except the bots didn't like the link in the first place, and haven't re-indexed it yet. Because of that, the link listed in Google is dead now...

No big deal, right? - just '301' (permanent redirect) the link using '.htaccess' - but, the problem with this is - (regular) 301's won't pass arguments, so redirects are useless when you're dealing with 'module.php.'

So, I have 200 bots savaging my site, and I thought - Google Tap... Bingo!

Here's what I did (doc for next release):

Code:


1) Add this anywhere in the Google Tap section of your '.htaccess' file (in alphabetical order, if you wish):

        #Bandwidth Meter DSL
        RewriteRule ^bandwidth-meter-dsl.html modules.php?name=Bandwidth_Meter_DSL

Example:
        #Articles
        RewriteRule ^article-([0-9]*)-([a-z]*)-([0-9]*)-([0-9]*).html article.html$1&mode=$2&order=$3&thold=$4
        RewriteRule ^article([1-9][0-9]*).* article.html$1
        RewriteRule ^article-topic-([0-9]*).html article-topic-.html$1
        RewriteRule ^allnews.html modules.php?name=News&file=allindex

        #Bandwidth Meter DSL
        RewriteRule ^bandwidth-meter-dsl.html modules.php?name=Bandwidth_Meter_DSL

        #Content
        RewriteRule ^contentid-([1-9][0-9]*).html contentid-.html$1
        RewriteRule ^content-cat-([1-9][0-9]*).html content-cat-.html$1

2) Add this right below '$urlin = array(' in your 'header.php' file:

        "'(?<!/)modules.php\?name=Bandwidth_Meter_DSL'",

Example:
        function replace_for_mod_rewrite(&$s) {
        $urlin = array(
        "'(?<!/)modules.php\?name=Bandwidth_Meter_DSL'",
"'(?<!/)modules.php\?name=News&amp;file=article&amp;sid=([0-9]*)&amp;mode=([a-z]*)&amp;order=([0-9]*)&amp;thold=([0-9]*)'",
        "'(?<!/)modules.php\?name=News&amp;file=article&amp;sid=([0-9]*)'",
        "'(?<!/)modules.php\?name=News&file=article&sid=([0-9]*)'",
        "'(?<!/)modules.php\?name=News&amp;new_topic=([0-9]*)'",

3) Add this right below '$urlout = array(' in your 'header.php' file:

        "bandwidth-meter-dsl.html",

Example:
        $urlout = array(
        "bandwidth-meter-dsl.html",
        "article-\\1-\\2-\\3-\\4.html",
        "article\\1.html",
        "article\\1.html",
        "article-topic-\\1.html",

That's it... :)

VinDSL (20-Jan-2005)


As soon as I implemented this, the bots started hitting the link. Google Tap really DOES work!

So, I'll see what comes of it...

Here's the GT'ed link: http://www.lenon.com/bandwidth-meter-dsl.html

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: Only registered users can see links on this board! Get registered or login! | Only registered users can see links on this board! Get registered or login! ::. 
View user's profile Send private message Visit poster's website ICQ Number
VinDSL







PostPosted: Sat May 07, 2005 2:49 pm Reply with quote

hitwalker wrote:
no hitwalker in the copyright....."by the idea of.....".. Crying or Very sad

Heh! I'm putting the wraps on an updated version today. Will this do? Smile

Code:
/************************************************************************/

/* PHP-NUKE Module: Bandwidth Meter DSL 1.1                             */
/* Copyright (c) 2005 by VinDSL (perfect.pecker@lycos.co.uk)            */
/* http://www.Lenon.com                                                 */
/* http://www.Disipal.net                                               */
/* http://www.NukeCops.com                                              */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

========================================================================
                CREDITS for Bandwidth Meter DSL 1.1
========================================================================
* PHP-Nuke
Copyright (c) 2002 by Francisco Burzi
http://phpnuke.org

World's Best Content Management System!
========================================================================

========================================================================
* Gambit Design Internet Services
Copyright (c) 2002 by Derek T Del Conte
http://gambitdesign.com

Ported original ASP code (unknown origin) to a standalone PHP program.
========================================================================

========================================================================
* Hitwalker (Webmaster, Hitwalker Phpnuke Database & Services)
http://hitwalker.nl

Original PHP-Nuke concept. Spurred me to port this code to a module.
========================================================================

========================================================================
* Gaylen Fraley (Webmaster, Ravens PHP Scripts And Web Hosting)
http://ravenphpscripts.com

Took a chance and beta tested early versions on his production web site.
========================================================================

========================================================================
* Bob Marion (Webmaster, NukeScripts Network)
http://nukescripts.net

Made changes to the routines for people that don't use 'nuke' as a
prefix in their sql db.  Also, discovered a nasty bug in the admin
panel, under certain conditions, and created a patch.
========================================================================

========================================================================
* Additional Credits
Please see each script file for respective credits and copyrights.
========================================================================
 
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Sat May 07, 2005 3:31 pm Reply with quote

Sure vin... :0
deffinately looks good...lol
Btw...your not gonna believe this but last week my previous version stopped pulling the info from the database...(those who did the test)
It said couldnt select database...
So i took the latest from your site....then it worked again.,..weird huh..
 
View user's profile Send private message
VinDSL







PostPosted: Sat May 07, 2005 4:34 pm Reply with quote

hitwalker wrote:
..your not gonna believe this but last week my previous version stopped pulling the info from the database... i took the latest from your site....then it worked again.,..weird huh..

Yeah, Bob Marion discovered a nasty bug in the admin panel, when error suppression was disabled, and came up with a workaround. It's fixed in the new version (1.1)... hopefully... Smile

I just uploaded it to my site: Only registered users can see links on this board! Get registered or login!
 
hitwalker







PostPosted: Sat May 07, 2005 4:44 pm Reply with quote

ah i see...
well i got it ,
thanks vin Smile
 
juliopsy
New Member
New Member



Joined: Nov 24, 2006
Posts: 1

PostPosted: Fri Nov 24, 2006 7:33 am Reply with quote

thanx vinDSL

Wink
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©