How to store post rating system data post independent?

What you want is actually pretty easy to achieve. The code from the tutorial you used saves and gets the data post dependent via update_post_meta() and get_post_meta(), which doesn’t suit your use case.

You just have to store your data post independent. This thought relates to the array of IP keys and time values you need for the timed restriction of the voting system you implemented. You can and probably should leave the way the vote count is saved untouched, because it’s logical to save this information post dependent.

Probably the easiest way to achieve saving the »[IP] => [time]« array post independent is by making use of the Options API. Thereby using the functions offered by the API as replacement for the post meta functions that are now used by your code. The functions you are going to need are: update_option() and get_option().

Below I’m outlining how to use them:

//option name
$opt_nam = 'def_opt_nam';

//get IP and TIME
$ip = $_SERVER['REMOTE_ADDR'];
$time = time();
//current visitor key:IP => value:TIME pair
$cvi_ipt = array (
    $ip => $time
);

//get the data array
$opt_arr = get_option( $opt_nam );

//update data array
//merge current visitor array with the data array from the options table
//if the key doesn't exist the a new pair is created, if a key exists the value gets updated
$upd_opt = array_merge( $opt_arr, $cvi_ipt );
//actually do the update
update_option( $opt_nam, $upd_opt );

Of course the code above is exemplary. You have to replace the post dependent approach, using post meta, with the suggested and outlined post independent one working with the Options API yourself. But this shouldn’t be all that hard to do now.


Update:

function post_like()
{
    $nonce = $_POST['nonce'];

    if ( ! wp_verify_nonce( $nonce, 'ajax-nonce' ) )
        die ( 'Busted!');

    if(isset($_POST['post_like']))
    {
        $ip = $_SERVER['REMOTE_ADDR'];
        $post_id = $_POST['post_id'];

        $voted_IP = get_option( "voted_IP" );

        if(!is_array($voted_IP))
            $voted_IP = array();

        $meta_count = get_post_meta($post_id, "votes_count", true);

        if(!hasAlreadyVoted())
        {

            $ip = $_SERVER['REMOTE_ADDR'];
            $time = time();
            $cvi_ipt = array (
                $ip => $time
            );
            $upd_opt = array_merge( $voted_IP, $cvi_ipt );

            update_option( "voted_IP", $upd_opt );
            update_post_meta($post_id, "votes_count", ++$meta_count);

            echo $meta_count;
        }
        else
            echo "already";
    }
    exit;
}

function hasAlreadyVoted()
{
    global $timebeforerevote;

    $voted_IP = get_option( "voted_IP" );

    if(!is_array($voted_IP))
        $voted_IP = array();

    $ip = $_SERVER['REMOTE_ADDR'];

    if(in_array($ip, array_keys($voted_IP)))
    {
        $time = $voted_IP[$ip];
        $now = time();

        if(round(($now - $time) / 60) > $timebeforerevote)
            return false;

        return true;
    }

    return false;
}

I implemented my suggestion into the code you posted in your question, but it’s untested.


Edit:
In response to the comment. Like I said before, the only thing to do was changing the place where the data is stored. To elaborate a little bit on that: Post meta is post depending – you can recognize that by the fact that you are using the post id to save and get the meta data from the wp_postmeta table. In contrast the options api stores data inside the wp_options table. The way I suggested the code this is post independent, because one option is used to store all the data – key:ip => value:time pairs – from all posts. That’s in (very) few words about it.