During days I get hit my flashes of ‘genius’ and my mind falters from here to there thinking how I can work this ‘ground breaking’ idea which after a few hours of thoughts and jotting down just get filed away never to see the light of days again.
Below are just a few of these ideas, beware though some are extremely devious and you should not think to much about them.
The SEO Tagger
The premiss of the plugin revolves around tags.
It will edit and modify a articles tags depending on what terms ‘land’ on it.
What I mean is just taking an example off woopra…someone googled ’super encoding guide’ and ended up on my article ‘http://thenexus.tk/a-basic-guide-to-video-conversion-using-super/‘
So on that article under the normal tags…if they stayed on the article for more than a set time limit (say 20 secs) those search terms (ie super, encoding and guide) would be added to the page like tags and link to the article.
The second aspect was using yahoo’s suggestion API to add these keywords by default and then eliminate or add to these as people landed on said article.
How you ask?
My technical knowledge is very limited but as I understand it or have sort of planned it is as such;
Two main components a js file and a XML file.
The XML file will be the ’storage’ unit for the keywords. I only say XML as putting it in the DB may cause strain for a high SE traffic site; while having one xml file dedicated per post (or one for the site but that may cause a max connection issue) will enable faster ‘parsing’ of the tags in to WP as opposed DB calls for each tag, as I assume that would be the alternative.
The JS file would be how the ‘keywords’ are ‘captured’ and stored etc. Again i’m making an assumption here based on how analytic s and woopra etc work.
So in regards of caching the keywords it would not be an issue as such. The JS file will store the keywords to the xml files which would refresh at the same time as the ‘live’ post.
So as the JS will reference the keywords from the xml file it ’shouldn’t’ really make a diff. on cache or non-cached.
The Auto Add clicker thingamjig
This idea is technically fraud, hence why I haven’t thought much more on this.
The premiss however revolves around a script similar to the one I have written in want a cookie? The twist however would be instead of following an affiliate link to drop a cookie; the super duper power of php would search for a url starting with the ad companies generic beginning; so in the case of bidvertiser it would look for that in a url leaving the page etc.
It would then click the add on a random basis which could be controlled and these clicks could be ‘distributed’ over certain ad networks etc.
This is all technically possible…but its fraud so I let it drop, but below is what I whipped up in a few hrs when thinking of this about yr ago.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | <?
//Game plan
//Step One - Check Reffer if from social media / google run script, if none = 404 [if reffere SU change chance at prelim to 1/100]
//Step Two - Roll Random Number 1-20 (5%) [1-100 if stumbleupon] ( 1%)
// Step Three - If roll = 1 Roll for Add Type
// Step Four - If '1' run 'add1' variable
// - If '2' Search page for url begining with http...secure.bidvertiser.com and run
// - If '3' Search Page for url begining with http:addclick.adtoll.com and run
//
// ---adtional ideas, after each 'click' counter =+1 once counter =10 change random to 1-200 at 20 = 1-300 etc etc counter resets daily.
//set var
var doit; // does the whole script
var randomtar //rolls random number 1-10 for each visitor
var randomadd //rolls random number to select which add to click
var add1; //defines add location 1
var add2; //defines add location 2
var add3; //defines add location 3
var adselec //if traget is selected roll which add to run,
//define var
randomtar = rand(1,10); //rolls 1-10
randomadd = rand(1,3); //rolls 1-3
add1 = header("Location: http://sitehoppin.com/Special:Random?userid=1135"); //add location 1
add2 = header("Location: "); // add location 2
add3 = header ("Location: http://"); //add location 3
adselec = if($random_number == 1)(randomadd); // if traget selected run random to find out which add to run
doit = if randomtar == 1 and randomadd == 1 (add1) //if target aquired and add acquired run add url 1
if randomtar == 1 and randomadd == 2 (add2); // if target aquired and add acquired run add url 2
if randomtar == 1 and randomadd == 3 (add3); // if target aquired and add acquired run add url 3
}
// activation
if(!$_SERVER[‘HTTP_REFERER’]){
header("HTTP/1.0 404 Not Found");
} else { "doit"
}
?>
HOWTOFINDURLS ON A PAGE SCRIPT
<?php
/*******************************************************************************
* grabber.php
* by voyager, 2003
*
* A class which is usefull for grabbing any information of any site over the net.
* It can retusrn a single value (text) or an array (texts) with given 'markup'
* strings. The class uses PHP CURL functions so you need CULR installed on your
* server
********************************************************************************/
class Grabber
{
var $content;
var $content_array;
var $noURL; //this is the boolean which will mark if to open the URL or not
var $text; //the text without starting and ending unneeded parts
var $searchar; // the searched array
var $searchtxt; //the searched text
// The constructor opens an URL and writes it in give file and dir
// if 4th argument is given it check if this file exists already
// when is the last modification and if it is older, opens the URL,
// else opens the file. If $ifmod=0 it always opens the URL
//it defaults to 24 hours
function Grabber($url,$tmpdir='tmp/',$tmpfile='tmp.txt',$ifmod=86400)
{
$this->content="";
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
$useragent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8";
curl_setopt($ch,CURLOPT_USERAGENT,$useragent);
$this->content = curl_exec ($ch);
curl_close ($ch);
}
//this grabs only a piece of text
function grab_unit($start,$end)
{
//cut from start to end
$this->text=substr($this->content,strpos($this->content,$start)+strlen($start)+1);
$this->text=substr($this->text,0,strpos($this->text,$end));
$this->searchtxt=$this->text;
}
//it gets start delimeter, end delimeter and an array of pieces to
//put out. Returns the array of needed infomation
//delimstart and delimend are arround the pieces of searched data
function grab_array($start,$delimstart,$delimend,$end)
{
//cut from start to end
$this->text=substr($this->content,strpos($this->content,$start)+strlen($start)+1);
$this->text=substr($this->text,0,strpos($this->text,$end));
//getting out the unndeeded and pushing into the array
$this->searchar=preg_split("@$delimstart|$delimend@",$this->text);
}
//the elemnts of the array arent still what we need?
function refine_array($start,$end,$clear_html=0)
{
for($i=0;$i<sizeof($this->searchar);$i++)
{
$this->searchar[$i]=substr($this->searchar[$i],
strpos($this->searchar[$i],$start)+strlen($start));
if(!empty($end))
{
$this->searchar[$i]=substr($this->searchar[$i],
0,strpos($this->searchar[$i],$end));
}
if($clear_html)
{
$this->searchar[$i]=strip_tags($this->searchar[$i]);
}
}
}
//You still have some unregular data which makes everything bad?
// REmove the trash, giving an array of it
function remove_trash($trash)
{
for($i=0;$i<sizeof($trash);$i++)
{
for($j=0;$j<sizeof($this->searchar);$j++)
{
$this->searchar[$j]=str_replace($trash[$i],"",$this->searchar[$j]);
}
$this->searchtxt=str_replace($trash[$i],"",$this->searchtxt);
}
}
//this function does not work with the members of the grabber.
//it just takes start and end limits and the content - $word
// to return whats inside. You can easy debug it with giving 1 to testvar
function cut($start,$end,$word,$testvar=0)
{
$word=substr($word,strpos($word,$start)+strlen($start));
if($testvar) die($word);
$word=substr($word,0,strpos($word,$end));
return $word;
}
function send_post($vars, $url)
{
$strRequestBody = "";
while (list($key, $val) = each($ascVarStream))
{
if($strRequestBody != "")
$strRequestBody.= "&";
$strRequestBody.= $key."=".$val;
}
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $strURL);
curl_setopt ($ch, CURLOPT_POST, $strRequestBody);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $strRequestBody);
$return_string = curl_exec ($ch);
curl_close ($ch);
if ($return_string=="") {
$message="Error: Could not post to remote system.";
return $message;
}
return $return_string;
} // End function
}
?> |
The shadow benefit
This idea is again very ‘devious’ its main idea was to mask links.
What the intial idea was that there would be two sets of links 1) = do-follow 2) = no-follow /JS renderations.
This was back in the day I thought PR was god. What the idea was that we would show all users links as do-follow but the spiders as no-follow; so getting the benefit of link hunters but not losing any PR.
The second possible use of this was to hide links from human inspection but to show them to Ye Olde Google…so a type of link laundering if you will. Link farms that would ‘pass’ inspection but still be farms.
The problem with this method (apart from being evil) was that it would have to rely on a list of user-agents and IP adds of the SE’s either in .htaccess or in php. It would be therefore impossible almost to keep the list update. Below is the preliminary ‘link hiding’ widget for wordpress I coded. (its not good at all :p)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | <?php
/*
Plugin Name: LinkHider
Plugin URI: http://www.thenexus.tk/linkhider
Description: The main aim of this plugin is to hide paid links from googlebot yet not add the 'no-follow' tag.
Version: 1.0.0
Author: Donace
Author URI: http://www.thenexus.tk
*/
//nb cloaking option? no index option? nofollow option.....make google see noindex / no follow while normal = follow
//creates the classes
if (!class_exists("linkhider")) {
class linkhider {
function linkhider() { //constructor
}
}
} //End Class Creation
//calls the classes
if (class_exists("linkhider")) {
$pl_lh = new linkhider();
}
//Actions and Filters
if (isset($pl_lh)) {
//Actions
//Filters
}
?>
<?php
//adds admin panel
class linkhider {
var $adminOptionsName = "LinkHider";
function linkhider() {//contructor
}
//initializes it
function init() {
$this->getAdminOptions();
}
//calls these on first activation
add_action('activate_linkhider.php',
array(&$pl_lh,'init'));
?>
<?php
//creates the widget
function wp_link_hider($args) {
extract($args);
$options = get_option('widget_link_hider');
$title = $options['title'];
if ( empty($title) )
$title = 'Link Hider';
?>
<?php echo $before_widget; ?>
<?php $title ? print($before_title . $title . $after_title) : null; ?>
<?php
//hides it from google
if(condition) { $userAgent = $_SERVER['HTTP_USER_AGENT'];
if(stristr(strtolower($userAgent), 'googlebot') === FALSE) {
do
} elseif(condition) { ( ! preg_match(”/google/i”, $_SERVER['HTTP_USER_AGENT'] ){
do
//NORMAL USER BROWSING SHOW THE ADS
} //<!– Your PAID Ads Code –>
}
else {
//links with no follow no index
}
?>
<?php echo $after_widget; ?>
<?php
} //allows to change title
function wp_widget_link_hider_control() {
$options = $newoptions = get_option('widget_link_hider');
if ( $_POST["title-submit"] ) {
$newoptions['title'] = strip_tags(stripslashes($_POST["line-title"]));
}
if ( $options != $newoptions ) {
$options = $newoptions;
update_option('widget_link_hider', $options);
}
$title = attribute_escape($options['title']);
?>
<p><label for="link-title"><?php _e('Title:'); ?> <input style="width: 200px;" id="link-title" name="link-title" type="text" value="<?php echo $title; ?>" /></label></p>
<input type="hidden" id="link-submit" name="link-submit" value="1" />
<?php
}
function wp_widget_link_hider_register() {
$dimension = array('height' => 100, 'width' => 300);
$class = array('classname' => 'widget_link_hider');
wp_register_sidebar_widget('link', __('Link Hider'), 'wp_widget_link_hider', $class);
wp_register_widget_control('link', __('Link Hider'), 'wp_widget_link_hider_control', $dimension);
}
add_action('plugins_loaded','wp_widget_link_hider_register');
?> |
htaccess firewall
When I came online in the webmaster world I was fairly security concious and reading Jeff’s Site had shown me the power of the mighty htaccess file so I tried to one up him and make a better defence and so from stealing code from here and there came up with the code below, its main aim being stopping automated attacks.
However it was not 100% and now I acknowledge I will not reach Jeff’s knowledge level … for a few years yet anyway.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | RewriteEngine On
Options +FollowSymLinks
ServerSignature Off
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC,OR]
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999}.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|scan).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*\.[A-Za-z0-9].* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC]
RewriteRule ^(.*)$ access_log.php |
The Desert Rose
Inspired by listening to that old song by Sting (the only one I have ever heard of his actually!). The dream to make and manage hundreds of blogs from one location.
What it would involve would having one central directory and separate databases for all the sites. Minimising required space and *cough* very useful for mass automated blogs.
Though this CAN be done with a little wp-config tweaking…and a quick Google will teach you how! Though it would be easier using a plugin and not using Wordpress MU!
though we still need a central panel to moderate all the comments/ blogroll links etc…i’ll leave that to you!
The Need FOR Speed
This idea focus son the wordpress template. I enjoy finding way to tweak and optimize for speed. (though rarely implement).
This ‘plugin’ has many way to help speed up the site.
1) PHP relatives;
Generally templates use commands such as php echo etc. What this once click function (as I envisioned) would do was search your theme for all these php commands and replace them with a constant.
The speed difference may be minimal but it should help with propagation time. The problem being a new widget etc in the them would require it to go back to relatives when adding and then back to ’strict’ later.
2) Combine, minify, compress CSS.
Using a combination of methods similar to as described here and here. What it would do on page load…it would detect all css files called and then add this to a ‘cache folder’ where it would combine minify compress etc while also adding expiry tags etc and all that yahoo yslow recommends :p
This will reduce http requests and reduce the file size of the css files = faster!
3) JS minify, oneify and gzip.
Exactly the same as above; it would combine minify and gzip alsong with expiry/etags to make it nice a fast!
For both 2 and 3 it would ofc be possible to create a new version of these files on update etc. or periodically if you choose.
The alternative is doing it ‘on the fly’ however I feel this would just be a waste of resources.
Do you Ajax?
The last of my ideas (well the ones I wrote down and saved on my phone).
This was working in conjuncture with my ’speed’ plugin. What it basically was meant to do was create a static version of the template. The widgets such as top post / commenter etc would update when a new version of the static template was created (24hr cron job?).
This would basically mean the template would be nice and fast (possibly with it the css and js integrated in to a nice html file) and the ‘centre’ would be the ‘post area’ where you could browse using the power of ajax to ‘flip’ the posts so not requiring the template to reload at each page view!
So those were some of my ideas (think 10% of a week)…what do you think of them? any good? how would I go about making some of them see the light of day? Feel free to share your wacky ideas!
Popularity: 9% [?]
Related posts:
- Keyword Research with Market Samurai Niches come in as many flavours as Ben and Jerrys ice-cream. Macro/Micro/Super Micro Niches even all require good research for you to find that traffic...
- Free Blog Commenter Now my Blog Comment Demon Review that I did a little while ago was received I suppose as any negative review is received. Some people...
- 16 Comments
- Tags: ideas
SEO tags – concept is not new and gains some traction lately ony without dynamic part. Depends on Google says it will live or die.
And by the way is client-side and can’t write to XML on server, you are missing some part of chain here.
Skipping fraud stuff, not worth trouble.
htaccess is powerful but dangerous toy, I try to keep use to the minimum. I had read it adds some overhead on server-side processing as well.
On speed – there are plenty of excellent (and more of crappy) caching plugins for WordPress already. Some do exactly what you describe. By the way I had very obscure troubles minifying CSS – danger of ruining theme in some browsers is not worth saving few Kb on minifying. Compression saves more and is safer.
Really speaking about the SEO tags; i’ve had the idea since I figured out tags were bringing in traffic almost 1yr ago now. Just didn’t have the the skill to code it up.
Re the xml . what I was actually thinking was that we give the JS a little we pit of a encrypted pass code…it would then tell Mr. small php it which would also check its location to make sure it on my site and then give it permission to write to xml. I figured that would work :p
Htaccess is stupidly powerful , the overhead shouldn’t be to much..I haven’t really experiencing it to be to high. I think upon testing there was a 0.3sec lag time on a 56k modem…so negligible on broad band.
re: speed plugin…yes minifying can be dangerous but making all the css files in to one big one and then serving it gzipped saves the oh precious http requests making things ‘that’ much faster. Would love a link to these plugins Rarst…maye I can make shift one together from them!
I am no techie either and it took me a while to plod through this very elaborate and clear post. I now think that I understand what it is all about. I am however bookmarking it for reference till I can comment intelligently to your specific queries. I however think that whacky or not, they are worth trying out and sharing the outcome with all of us.
In regards to the tags; I have ’submitted’ the idea to a few plugin designers and they said they’ll have a look at it. the rest…well this might inspire someone out there!
Incidentally, I have not been able to access your site the past few days with the comment that it was timed out or not loading. After the 14th, today is the first time that I have been able to access your site.
Hmm I had some issues one day with the server in the afternoon causing super laggage … were you able to access the site? if so and the only problem was commenting then I dont know! if you couldn’t access then i’ll have a quick look at the logs.
Since yesterday, everything seems to be alright.
Cheers, would love to hear if you got any critique or ideas of your own!
I didn’t bother reading all the codes because none of it makes any sense to me. I liked the SEO idea, but was just wondering if every time it added a new link it would delete one of the old ones, otherwise it wouldn’t be long before your post was full of links?
I don’t know Sire :p I just envisioned it to work in a similar fashion to a mini-tag cloud another each post…I suppose you could impose limits and only have the highest traffic building ones there…If I ever get round to it will keep it in mind.
This looks like a great idea, its makes it easier to do SEO for your articles.
Donace, You are doing great stuff. i also sometime gets weird ideas but have never implemented them.
Cheers Nihar; I usually have loads of ideas; I usually write some down and implement or pad out even fewer…but hey useful to keep your brain agile and always analysing and looking at it with a critical eye.
Yeah you’re right. Be sure to write them down when you get the idea. Trust me you will forget if you don’t.
You know something? We are soooo much alike… I get struck by “brilliant” ideas at the time of conception. A few hours of brainstorming and thinking and i don’t even think they’ll be worth checking out… I thought i was the only loony out there
LOL…this blog was first called ‘rants of a loony toon’! Idea flow out of me like crazy but I am impatient and a slow coder so I have loads of ’shelved’ projects…Thanks for dropping by Stratosg