Browsing Posts in Coding

ping

When mass producing new pages or changing some content I like to send a ping to a bunch of update services to let them know that my page has been updated or there is some new content around. There are some pingers out there that require you to tick a bunch of boxes, enter your url and possibly even your email address. It just takes too much time. There is a pinger built into your wordpress blog but what if you need to ping an outside page like a new Squidoo lens you have just created. Here is how you can quickly create a ping button for your Firefox. Simply hit the button and your current page will get pinged.

Here is the javacode that you need:

javascript:location.href='http://pingomatic.com/ping/?
title='+encodeURIComponent(document.title)
+'&blogurl='+encodeURIComponent(location.href)
+'&chk_weblogscom=on&chk_blogs=on&chk_technorati=on&chk_feedburner
=on&chk_syndic8=on&chk_newsgator=on&chk_myyahoo=on&chk_pubsubco
m=on&chk_blogdigger=on&chk_blogrolling=on&chk_blogstreet=on&chk_mo
reover=on&chk_weblogalot=on&chk_icerocket=on&chk_newsisfree=on&chk_
topicexchange=on&chk_google=on&chk_tailrank=on&chk_bloglines=on&chk
_aiderss=on&chk_skygrid=on&chk_audioweblogs=on&chk_rubhub=on&chk_
geourl=on&chk_a2b=on&chk_blogshares=on'

Right click on your bookmarks toolbar and create a new bookmark. Call it Ping or whatever you like. In location field copy and paste the javascript above and click on add. You are done! Navigate to the page you would like to ping and hit the button.

chameleon

If you are into black/gray hat marketing you will eventually end up with your affiliate manager giving your a lot of hassle. Even if you hide the referrer eventually you will be contacted and asked to provide more details about your sources of traffic. This chameleon landing page can be a real life saver! Let me tell you how it works before I go into code.

You will end up with a legitimate whitehat landing page that will act like any other page. It will even get indexed by search engines like a regular website. However if you were to send traffic to it from a particular unique url it will turn into your blackhat page. For example have a look at this quick chameleon page I set up on http://www.exposedseo.com/tests/test.php It will look whitehat to every human and spider until you come from this page http://www.exposedseo.com/tests/blackhat.php

Lets setup the chameleon page first.


< ?php
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "http://www.yourredirectpage.com")
{
echo "
Here you will need to copy and paste your blackhat landingpage source code. Keep in mind that you will need to swap all " for ' in your code.
";
}
else
{
echo "
Now you need to copy and paste your whitehat source code here.
";
}
?>

Now you need to setup your redirect page. (Without spaces after < )


< body onload="javascript:frmForcedReferrer.submit();">
< form action="http://www.yourchameleonpage.com" method="post" name="frmForcedReferrer">
< /form>

You are done!

Send all your blackhat traffic to your redirect page which will then get redirected to your chameleon landing page. When your affiliate manager or anyone else comes to see where the traffic is coming from they will see the whitehat side of your landing page. Enjoy!

JavaScript fun

3 comments

The code bellow is often used to fake stats or earnings. Simply copy and paste the code into your address bar and click enter. Now you should be able to move around and change various elements on the page. Click on text and you should be able to change it to anything you like.
address bar
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

Go to any page which contains images. You can even do this on my blog even though it might not work as well. Then enter the code bellow into your browser address bar and hit enter. Watch the graphics go crazy.

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+”px”; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+”px”}R++}setInterval(’A()’,50); void(0);

If you liked the previous two you might want to try the code bellow as well before you get carried away.

javascript:function reverse() { var inp = " )-: moc.oesdesopxe.www//:ptth kramkoob dna ho !krow ot kcab ssa ruoy teG !ton kniht I ?avaJ htiw dnuora ssem ot uoy yap ynapmoc ruoy seoD"; var outp = ""; for (i = 0; i < = inp.length; i++) {outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse()

The code bellow works best with Google. Go there and use it.

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval(’A()’,5); void(0);

Every now and then I would end up on the website with a horrible, red background and yellow text. Well, any horrible combination of colours will usually kill my eyes after a few minutes of reading. You can use the code bellow to change the background colour to anything you like. Copy and paste this code into your address bar and hit enter. A popup should appear asking you to pick a colour. You can then use a colour hash or tap in primary colour names eg white. Hit enter and voi·là!

javascript:void(document.body.style.background = prompt("Enter a background color", "#ffcc99"));

Go to Google and use the code bellow. Simply change the url to the url of any image you like and hit enter. You now have a custom Google logo.

javascript:void(document.images[0].src =”http://www.exposedseo.com/pictures/adtoll_referral.gif”);