WebQuartet Directory philippines Increase Youtube Video Views


Here's the amazing cover letters ==> Amazing Cover Letters
Here's the amazing resume creator ==> Amazing Resume Creator
Guide to Job Interview Answers ==> Job Interview Answers
Secrets to Job Interviews ==> Job Interview Secrets
Best Source For Flexible Jobs ==> Job Search
Increase Your Youtube Video Views

IP Catching

Just for educational purpose. You can limit number of IPs to get your offer or catch thieves on downloading. I don’t know where you will use this but this is simple but powerful.

Here’s the code:

<?php
$v_ip = "$REMOTE_ADDR";

$fd = fopen("visitorIPs.log", "r");
$value = "";
while(!feof($fd)){
	$value .= fread($fd, 4096);
}
fclose($fd);
$value=explode("|",$value);

if (count($value)<300) {

	$result = -1;
	for ($i = 0; $i <= count($value); $i++) {
		if (strcmp($value[$i], $v_ip) == 0) {
			$result = $i;
		}
	}

	if ($result == -1) {
		$file = fopen("visitorIPs.log", "a");
		fputs($file, $v_ip."|", strlen($v_ip."|"));
		fclose($file);

		echo "Congratulations, you made on one of the first 300 limit!";
	} else {
		echo "Thanks for visiting again!";
	}

} else {

echo "Sorry, the 300 limit is already used! Better luck on the next offer.";

}
Â
?>

Save it as .php file.

Leave a Reply

You must be logged in to post a comment.


A Ross Dalangin's Network

WebQuartet Channels is Digg proof thanks to caching by WP Super Cache

Feel FREE to download these premium products that could help you on your Internet Marketing Journey!

Make Money Online Newsletter

Please fill in and submit the form below to subscribe to our mailing list and receive wordpress themes, internet marketing and makemoney online books for FREE.


Your privacy is highly respected. We hate spam just as much as you do. We will never rent, share or sell your Email address to anyone!