Page 2 of 2

Posted: Thu Nov 06, 2008 7:27 pm
by Matt
Upgraded the server to another gig of ram + 100mpbs and they moved the vps to another server. Sites running much faster and smoother

Posted: Thu Nov 06, 2008 8:46 pm
by traumatic
8)

Posted: Thu Nov 06, 2008 9:18 pm
by DoubleDutch
8) and expensive?

Posted: Thu Nov 06, 2008 10:46 pm
by Matt
As long as people click on the ads it'll be profitable 8) 8)

Posted: Fri Nov 07, 2008 9:21 am
by DoubleDutch
Whats the site url?

Posted: Fri Nov 07, 2008 1:43 pm
by Matt
If you're really interested I can PM you lol

Posted: Fri Nov 07, 2008 2:29 pm
by DoubleDutch
Ok, please PM me - I'm really curious now. :D

btw: you should link from here - won't it 'up' your google rank?

Posted: Fri Nov 07, 2008 4:43 pm
by Pantcho!!
PM me the site, I hope we all get free membership :)

Posted: Fri Nov 07, 2008 6:19 pm
by Thalius
linklink ! hehehe

On the long run i think you dont get around a profile system where you store related votes inside the profile DB.

Create a Vote Table with all votes by user ID ( index field ) or IP (well IP restrictions apply bad idea).

Then create a link table which links votes against user IDs and then do a left joint query across both tables. This is probably the fastest way and uses a binary indexing and search on the db tables inside mysql.


Or Simpler:
Use a Table for IPs stored as Integers ( Longs ) then use this as (Indexed!) lookup table with a COUNT query on the IP Table and IF the result is greater than 1 the user has voted and then you can do the real query on the Votes table to get the IDs and compare them. That way you just do the hard query on need.

To create a Integer Decimal based IP ID you can use the following:

Code: Select all

<?php
$a = 192 ;
$b = 168;
$c = 1;
$d = 1;

$ip = $a*pow(256,3) + $b*pow(256,2) + $c*256 +$d ;
echo $ip;
?>
Cheers,
Thalius

Posted: Fri Nov 07, 2008 7:12 pm
by Matt
links sent, just remember the site makes money ;) and enjoy

Thalius wrote:linklink ! hehehe

On the long run i think you dont get around a profile system where you store related votes inside the profile DB.

Create a Vote Table with all votes by user ID ( index field ) or IP (well IP restrictions apply bad idea).

Then create a link table which links votes against user IDs and then do a left joint query across both tables. This is probably the fastest way and uses a binary indexing and search on the db tables inside mysql.


Or Simpler:
Use a Table for IPs stored as Integers ( Longs ) then use this as (Indexed!) lookup table with a COUNT query on the IP Table and IF the result is greater than 1 the user has voted and then you can do the real query on the Votes table to get the IDs and compare them. That way you just do the hard query on need.

To create a Integer Decimal based IP ID you can use the following:

Code: Select all

<?php
$a = 192 ;
$b = 168;
$c = 1;
$d = 1;

$ip = $a*pow(256,3) + $b*pow(256,2) + $c*256 +$d ;
echo $ip;
?>
Cheers,
Thalius
thanks for the tips :)

Posted: Fri Nov 07, 2008 9:10 pm
by DoubleDutch
Just seen the link - not normally something I'd visit, but I can understand how it could make you some $.