I made another widget! I had a hard few hours trying to figure out why my last widget wasn’t saving it’s options, I had to go through every single bit of code to figure it out and it turns out that I had missed an equals sign! just a piddly little character can throw a spanner in the works!
Now I know whats up, I can churn out widgets left, right and center!
Here’s my latest one…
It’s called GetCookie, it’s a widget that can’t be seen.
Just input your affiliate site URL into the options and save. The widget will add a hidden layer to the html and load the affiliate site in the background without the user knowing.
What’s the point? hehe, the point being ;
If someone visits this blog, they will receive the cookie my affiliate site sends when a user surfs there via my affiliate link. They can then go off and carry on surfing, if they come across the site without an affiliate link (ie. if they search Google for the product and click through direct to the company url from the results shown) then the affiliate site will think that they came through my link because of the cookie they got when they visited my blog.
The widget obfuscates the code so someone looking at the source wont be able to see the call to the affiliate page. (the previous post about decoding bin2hex gives a hint at the obfuscation code)
Here’s the options on the widget:

I only wrote it for myself so I didn’t have to manually put the code into the template code. You can download it here:
GetCookie Widget
Download and extract file, upload getcookie.php into your plugins directory and activate it. You can then see “get cookie” in your widgets tray, drag it to your sidebar and click the options icon to add your affiliate url (as above) and you should be good to go.
I’ve tested it with a few different affiliate links in Firefox and it worked. If you have any problems with it, let me know. Note: if your affiliate site has a break frames function on it’s page then this widget wont behave.
If your affiliate company finds out you’re using a method like this then you’ll probably be banned!!