Thread: Vote4Cash problem

Results 1 to 5 of 5
  1. #1 Vote4Cash problem 
    Registered Member `Xodian's Avatar
    Join Date
    Jul 2011
    Posts
    350
    Thanks given
    15
    Thanks received
    14
    Rep Power
    66
    The votes don't reset after 24 hours. Help me some one? I'm using PI.
    Reply With Quote  
     

  2. #2  
    Extreme Donator

    CusYaBasic's Avatar
    Join Date
    Jul 2010
    Age
    29
    Posts
    290
    Thanks given
    85
    Thanks received
    26
    Rep Power
    88
    Quote Originally Posted by `Xodian View Post
    The votes don't reset after 24 hours. Help me some one? I'm using PI.
    Post your text in your php/html file.
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member `Xodian's Avatar
    Join Date
    Jul 2011
    Posts
    350
    Thanks given
    15
    Thanks received
    14
    Rep Power
    66
    Quote Originally Posted by sherbie View Post
    Post your text in your php/html file.
    ?
    What
    Reply With Quote  
     

  4. #4  
    hmu

    Jakey's Avatar
    Join Date
    Sep 2007
    Age
    34
    Posts
    6,489
    Thanks given
    109
    Thanks received
    277
    Rep Power
    1218
    in a spoiler or quote, post your WHOLE code that is in you .php/.html file on here.
    to contact me, PM me on rune-server.
    Reply With Quote  
     

  5. #5  
    Registered Member `Xodian's Avatar
    Join Date
    Jul 2011
    Posts
    350
    Thanks given
    15
    Thanks received
    14
    Rep Power
    66
    Code:
    <?php
    
    
    $vote_checking = false;
    
    $host = "localhost";
    $user = "toomuchp_vote";
    $pass = "123vote123";
    $name = "toomuchp_voting";
    
    $vote1 = array("name" => "Moparscape", "url" => "http://www.moparscape.org/serverstatus.php?action=up&server=toomuchpk.no-ip.biz");
    $vote2 = array("name" => "Mmorpgtoplist", "url" => "http://www.mmorpgtoplist.com/in.php?site=46598");
    $vote4 = array("name" => "Rune-Server", "url" => "http://www.rune-server.org/top.php?act=vote&sid=4595");
    $vote5 = array("name" => "Top100arena", "url" => "http://runescape.top100arena.com/in.asp?id=63465");
    
    if(!@mysql_connect($host, $user, $pass))  {
    	die("error connecting to mysql server - " . mysql_error());	
    }
    if(!@mysql_select_db($name))  {
    	die("error selecting mysql database - " . mysql_error());	
    }
    
    if($vote_checking) {
    	$sql = mysql_query("SELECT * FROM `tempvotes`");
    	if (mysql_num_rows($sql) > 0) {
    		while ($row = mysql_fetch_array($sql)) {
    			if((time() - $row['time']) > 3600)  
    				mysql_query("DELETE FROM `tempvotes` WHERE `id` = '" . $row['id'] . "'");
    		}
    	}
    }
    
    $sql = mysql_query("SELECT * FROM `votes`");
    if (mysql_num_rows($sql) > 0) {
    	while ($row = mysql_fetch_array($sql)) {
    		if ((time() - $row['time']) > strtotime("+1 day", $row['time'])) {
    			mysql_query("DELETE FROM `votes` WHERE `authcode` = '" . $row['authcode'] . "'");
    		}
    	}
    }
    
    if($vote_checking) {
    	if(isset($_GET['postback'])) {
    		$id = anti_sql($_GET['postback']);
    		mysql_query("UPDATE `tempvotes` SET `voted`='1' WHERE `id` = '" . $id . "'") or die("error running query - " . mysql_error());
    	}
    }
    function checkIP($sqlConnect) {
    	$query = $sqlConnect->query("SELECT * FROM `authcodes` WHERE `ipaddress` = '".$_SERVER['REMOTE_ADDR']."' ORDER BY `id` desc LIMIT 1");
    	if ($query->num_rows > 0) {
    		while ($result = $query->fetch_assoc()) {
    			if (time() - $result['time'] < 60*60*24) {
    				return true;
    			} else {
    				return false;
    			}
    		}
    	} else {
    		return false;
    	}
    }
    
    function checkSession() {
    	if (isset($_SESSION['votetime'])) {
    		if (time() - $_SESSION['votetime'] < 60*60*24) {
    			return true;
    		} else {
    			return false;
    		}
    	} else {
    		return false;
    	}
    }
    
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Toomuchpk - Vote</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="vote.js"></script>
    </head>
    <body>
    <table width="75%" border="0" cellpadding="1" align="center" id="box">
      <tr>
    <noscript><div style="text-align: center; color:red;">YOU DO NOT HAVE JAVASCRIPT ENABLED YOU MAY NOT VOTE.</div></noscript> 
    	<td class="contents">
    	  <h3>Vote for us</h3>
    	  <p>Voting for us each day helps us become more popular each day. How you may think? The more votes we get the higher ranked we are on RuneScape private server lists. The higher we are the more times people may want to click on us and join. So to becomming a great server we need votes to make us stand out from the rest.</p>
    	  <p>We offer an reward for voting us, now we only offer this reward when you vote at all 4 sites below. To do so click each button fill the recaptcha image and vote. Then come back and wait for the timer and then you will be given an Auth code. Use this auth code in-game by doing ::auth authcode to receive your reward.</p>
    	  <noscript><div style="text-align: center; color:red; font-weight: bold;">YOU DO NOT HAVE JAVASCRIPT ENABLED YOU MAY NOT VOTE.</div></noscript> 
    				  <?php 
    			if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 1)) {
                            	echo "<div style=\"text-align:center; color:red;\">Proxy ban. ;-)</div>";
                            } else if(mysql_num_rows(mysql_query("SELECT * FROM `votes` WHERE `ipaddress` = '" . $_SERVER['REMOTE_ADDR'] . "' LIMIT 1;")) > 0) {
    				echo "<div style=\"text-align:center; color:red;\"><p>You have already voted in the last 24 hours. But you can get your friends to vote for you, just remember to ask them for the auth code.</div>";
    				echo "<div align=\"center\"><textarea readonly=\"readonly\" onClick=\"this.focus();this.select();\" style=\"width:315px; height:15px;\">http://toomuchpk.com/vote.php</textarea></div>";
    			} else if(isset($_POST['confirm'])) {
    				$voteid = anti_sql($_POST['voteid']);
    				$give_auth = true;
    				if($vote_checking) {
    					$query = mysql_query("SELECT * FROM `tempvotes` WHERE `id` = '".$voteid."'");
    					if(mysql_num_rows($query) > 0) {
    						$row = mysql_fetch_array($query);
    						if($row['voted'] == 1) {
    							mysql_query("DELETE FROM `tempvotes` WHERE `id`='".$voteid."'");
    						} else {
    							$give_auth = false;
    							echo "<div style=\"text-align:center; color:red;\">It has been detected that you have not actually voted at the websites. Go back and actually vote at the sites. ;-)</div>";
    						}
    					}
    				}
    				if($give_auth) {
    					$auth = random_auth();
    					mysql_query("INSERT INTO `votes` (`time`, `authcode`, `ipaddress`) VALUES('".time()."', '".$auth."', '".$_SERVER['REMOTE_ADDR']."')");
    					echo "<div style=\"text-align:center; color:yellow;\">Your auth code is ".$auth." type ::auth ".$auth." to receive your reward in-game.</div>";
    				}
    			} else {
    				if($vote_checking) {
    					$randomid = rand(10000, 20000);
    					mysql_query("INSERT INTO `tempvotes` (`id`, `time`, `ipaddress`) VALUES('".$randomid."', '".time()."', '".$_SERVER['REMOTE_ADDR']."')");
    				}
    			?>
    			<p>
    			<div id="vote" align="center">
    				<form>
    					<input type="button" value="Vote: <?php echo $vote1['name']; ?>" onclick="window.open('<?php echo $vote1['url']; ?>'); setStatus(1);"/>
    					<input type="button" value="Vote: <?php echo $vote2['name']; ?>" onclick="window.open('<?php echo $vote2['url']; ?>'); setStatus(2);"/>
    				        <input type="button" value="Vote: <?php echo $vote4['name']; ?>" onclick="window.open('<?php echo $vote4['url']; ?>'); setStatus(4);"/>
     <input type="button" value="Vote: <?php echo $vote5['name']; ?>" onclick="window.open('<?php echo $vote5['url']; ?>'); setStatus(5);"/>
    </form>
    			</p>
    			<div id="votewarning"></div>
    				<div id="votestatus">
    					<form method="post" name="voted">
    						<input type="hidden" name="confirm" value="true"/>
                  			<?php if($vote_checking) { ?>
    						<input type="hidden" name="voteid" value="<?php echo $randomid; ?>"/>
                            <?php } ?>
    						<input type="button" name="reward" value="Reward" onclick="javascript:checkStatus()"/>
    					</form>
    				</div>
    				</form>
    			</div>
    			<?php } ?>
    	</td>
      </tr>
    </table>
    <div id="footer">Copyright &copy; 2011 <a href="http://toomuchpk.com">Tanner</a> <!-- Please leave credits alone. ;-(-->System by <a href="http://toomuchpk.com">Tanner</a>.
    </body>
    </html>
    <?php
    
    function anti_sql($sql)
    {
    	return mysql_real_escape_string($sql);
    }
    
    function random_auth() 
    {
    	$random = "";
    	for ($i=0; $i<6; $i++) 
    	{
    		$d=rand(1,30)%2;
    		$random .= strtolower($d ? chr(rand(65,90)) : chr(rand(48,57)));
    	}
    	return $random;
    }
    
    ?>
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. MYSQL Help Please Vote4cash Problem
    By jackd019 in forum Help
    Replies: 6
    Last Post: 06-05-2012, 12:07 AM
  2. [Pi] Vote4Cash Problem
    By Harman in forum Help
    Replies: 13
    Last Post: 01-15-2012, 11:41 PM
  3. PI vote4Cash Problem
    By LiilCraZy in forum Help
    Replies: 0
    Last Post: 12-10-2011, 12:00 AM
  4. vote4cash problem
    By Humbler in forum Help
    Replies: 15
    Last Post: 12-16-2010, 05:22 PM
  5. Vote4cash problem [REP]
    By The Situationist in forum Help
    Replies: 6
    Last Post: 11-25-2010, 03:54 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •