Insert banner / ads between wordpress posting

we can place ads/ banner between posting 1 and 2 or 2 and 3 or inside the post.
For add the banner code :
First : Edit your theme, Find at index.php the wordpress code :

<?php if (have_posts()) : ?>

Add this code below that WP code :

<? $itest = 0; ?>

For add your ads/banner code : find WP code :

<?php while (have_posts()) : the_post(); ?>

And place below that this code:

<? if ( $itest == 1)
{
?>
<p align="left" style="padding-bottom:8px">
Insert here your ads/banner code
</p>
<?
}
else if ( $itest == 2)
{
?>
<p align="left" style="padding-bottom:8px">
Again if you want to place between post 2 and 3
</p>
<?
}
?>

You can add as much you want to place the ads/banner.

For add banner inside the post, you just find this code :

<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></a></h2>

Continue Reading

Php for get keywords from search engine referrer

I search, found and modified this php script for my purpose. I want to collect keyword from search engine that refer visitor to my website/ post. May be this script not really useful for you, or may be this scrip has some problems or bug, I hope you may help me to correct it, so this simpe php script can be very useful for others who need this script.

Code :

<?
$referrer = $_SERVER['HTTP_REFERER'];
$referrer ='http://www.google.co.id/search?hl=id&client=firefox-a&hs=IKn&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&q=pemahaman+pelajaran+ips+tentang+endogen+dan+eksogen&aq=f&aqi=&aql=&oq=&gs_rfai=';
$referrer_query = parse_url($referrer);
$referrer_host = $referrer_query['host'];
$referrer_query = $referrer_query['query'];
$q = "[q|p|qkw|key|query|searchfor|Keywords|searchterm]"; //Yahoo uses both query strings, I am using switch() for each search engine
preg_match('/'.$q.'=(.*?)&/',$referrer,$keyword);
$keyword = urldecode($keyword[1]);

$potongnya = array('&q=','&p=','key=','query=','searchfor=','Keywords=','searchterm=');
$referrer_query = str_replace($potongnya, "&|pencarian=", $referrer_query);
$arr = explode("&", "$referrer_query");
for($k = 0, $l = count($arr); $k < $l; ++$k)
 {
 $ygdicari = "$arr[$k]";
$findmeyach = "|pencarian=";
$posnyaaa = strpos($ygdicari, $findmeyach);
if ($posnyaaa === false)
 {}
 else
 {
$keyword = str_replace('|pencarian=', "", $ygdicari);
$potongkeynya = array('+','%20');
$keyword = str_replace($potongkeynya, " ", $keyword);
 }
 }
if ($keyword=="")
 {
$potongnya = array('q=','p=');
$referrer_query = str_replace($potongnya, "&|pencarian=", $referrer_query);
$arr = explode("&", "$referrer_query");
for($k = 0, $l = count($arr); $k < $l; ++$k)
 {
 $ygdicari = "$arr[$k]";
$findmeyach = "|pencarian=";
$posnyaaa = strpos($ygdicari, $findmeyach);
if ($posnyaaa === false)
 {}
 else
 {
$keyword = str_replace('|pencarian=', "", $ygdicari);
$potongkeynya = array('+','%20');
$keyword = str_replace($potongkeynya, " ", $keyword);
 }
 }

 }
$keyword = strtolower($keyword);
$urikeyword = array('sex ','porn ','porno',', ','penis ','penis ','http://www.','http://','http','gamble','"',"'");
$keyword = str_replace($urikeyword, "", "$keyword");
echo "$keyword";
exit;
?>

Continue Reading

Finally, Finished downloaded movie 3.47 GB

Finally today I have finished download torrent movie collection with capacity 3.47 GB. I was happy today, that movie has been finished downloaded. I enjoy with my internet connection that can download with 200kBps.

Great for aha and great for torrent that always can continue downloading the file wihtout error.

Alternative for reduce load at wordpress

Much website that using wordpress get suspended from their sharing hosting. This is mostly caused by high load that caused much visitor and much wordpress plugins used. For not get suspended from our hosting, we must reduce the load.

This is alternative for reduce load who use wordpress as blog engine. For reduce load, first simply deactive not really needed plugin. Just use plugin you really needed. For other plugin you can deactive for reduce the load at your hosting.

And others,we can use WP plugins W3 Total Cahce. This plugin help us for manage our wordpress, from reduce databse load, web, and others. For other detail and how to use it, we can see it at WordPress Plugin website.

Simple script for update statistics of your website or other usage

This is simple script for update statistics for your own website.
First we must have database/field at your database for statistics.
Ex : We add field “statistics” INT at your table “settings”

At file index, we must place code this :

mysql_query("UPDATE settings SET statistics=(statistics+1) WHERE ID=1");

That’s mean : script will count field statistics everytime file index.php loading. “Where ID=’1′” means we just update database settings that ID = 1. This is for only update statistics of ID 1

Change kloxo awstats to webalizer for less load server

This is how to change awstats, Web Statistics Program to webalizer. I read at kloxo forum, that webalizer more less load than awstats. So I change my web statistics program at Kloxo admin.

For change it , login to your Kloxo admin with username admin.
Inside kloxo, you will find “General Settings”. Inside this you can change Web Statistisc Program form awstats to webalizer. That’s it. Restart your kloxo server, and now your web statistics program has been changed to webalizer.

I am new for use this, so if this wrong, please comment help for fix this.
Thank you

create new directory at linux or ssh

sometime we must move one directory to other. For move directory/folder at SSH, we can login first at our SSH client server.

go to the folder where we want to move folder or file to new folder.

First, we must create new folder/directory. For create this, we must inside folder where new folder want to be created.

Inside folder, write command :

mkdir new_folder_name

For check new folder has been created or not, write command :

ls

We will find our new folder.

For move file or folder to our new folder, write command :

mv folder/file [space] new_folder

Ex : for move file

command :

mv contact.php contact

That command will move file “contact.php” to folder “contact”

For move folder, same command :

mv folder1 folder2

This command will move “folder1″ to “folder2″

Download movie using Torrent

This is the first time download movie using Torrent. Originally started to download the movie Shaun of the Sheep.

After searching in google, finally find download big movie using Torrent. To dowload torrent software for free, you can find at here.

After download and install, now looking for a movie torrent file from Shaun the Sheep. After find it’s torrent file and downloaded, run torrent software and add that torrent file. After that, leave it to torrent to download for you.

I still downloading shaun the sheep movie, still not finished yet, 3,4 GB of file.

php for encrypt your data

This php useful for encrypt your data. We can use this php for encrypt our email, or our customer email or other data.

We can use this php with $_GET function without no worry. Usually I use my variable with no encrypt like this :

$email = "$data[email]";
$link = go.php?email=$email;
echo "<a href=\"$link\">Other Page</a>";

with that php code, email will show at website url address. And this is can be manipulated by other for try something, with just change the link with some : http://mywebsite.com/go.php?email=other_email.

This is example for easy about email, but if we want to hide that email, we can use belod php code :

$email = base64_encode($data[email]);
$link = go.php?email=$email;
echo "<a href=\"$link\">Other Page</a>";

With this code, at web url address will not again display our email, but has been encrypted.

For use the result at file go.php, we must change the encrypt result to real email.

Code :

$email = base64_decode($_GET['email']);

with that code, we will get real value of variable email.

We can use this code for other purpose like  encrypt name, maybe address or bank account number or others that we want to hide that from visibility.

create cloud Tag use mysql database

This is other way to list cloud tag using mysql database.

<?php
$rtag = mysql_query("select * from tampilantag limit 50") or die(mysql_error());
if(mysql_num_rows($rtag) >0)
{
while($atagnya = mysql_fetch_array($rtag))
 {
if ($atagnya[dipake]>=18)
$ukuranfont ="18"."px";
else if ($atagnya[dipake]<9)
$ukuranfont ="9"."px";
else
$ukuranfont ="$atagnya[dipake]"."px";
echo"<a href=\"$atagnya[namatag].tag\" style=\"font-size:$ukuranfont\">$atagnya[namatag]</a>"." ";
 }
}
?>

This method will only display 50 Tag list from mysql database. We can change it with we like.

At tampilantag table, we need field :
namatag : variable char
dipake : variable Int

Enjoy it


Unblocked Website from your Home, workplace, school