Created
November 20, 2009 00:32
-
-
Save dennyhalim/239180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex /park-domain.php | |
#if you want to use htaccess redirect instead of php... | |
RewriteEngine On | |
#RewriteCond %{HTTP_USER_AGENT} !^Googlebot | |
RewriteRule (.*) http://www.ndparking.com/serve.php?lid=557555&dn=%{HTTP_HOST}&kw=$1 [R=301,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aptitude install nsd3 | |
# do not replace your nsd.conf files | |
# just paste this into it. | |
zone: | |
name: "." | |
zonefile: "root.zone" | |
provide-xfr: 0.0.0.0/0 NOKEY | |
provide-xfr: ::0/0 NOKEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// first of all, please sign up from here: http://snurl.com/parkweb | |
// | |
// code licensed http://creativecommons.org/licenses/by-nc/3.0/ | |
// plus, one rule. a link to http://snurl.com/parkweb AND http://dennyhalim.com from wherever this code used | |
// | |
// | |
// | |
// | |
$domain = str_replace('www.', '', $_SERVER['HTTP_HOST']); | |
//$domain = 'youdomainname.com'; | |
$url = $_SERVER['REQUEST_URI']; | |
$path = parse_url($url, PHP_URL_PATH); | |
$path_parts= pathinfo($path); | |
$path = $path_parts['dirname']; | |
$path= urldecode(stripslashes($path)); | |
$namafile = $path_parts['filename']; | |
$pisah = array("_", "/", "-", "++", " "); | |
$dicari = $path . "+" . $namafile; | |
$dicari = str_replace($pisah, "+", $dicari); | |
// $path= str_replace($pisah, "+", $path); | |
// $namafile = str_replace($pisah, "+", $namafile); | |
$arahkan = 'http://www.ndparking.com/serve.php?lid=557555&dn=' . $domain . '&kw=' . $dicari; | |
/* | |
// many ways to redirect. .htaccess, php, html, js, iframe. | |
// header("HTTP/1.1 301 Moved Permanently"); //use 301 if you want bot to follow | |
// header( "Location: $arahkan" ); | |
// <meta http-equiv="refresh" content="0;url=<?php echo $arahkan; ?>" /> | |
// <script type="text/javascript">window.location.href="<?php echo $arahkan; ?>";</script> | |
*/ | |
?> | |
<html> | |
<head> | |
</head> | |
<body> | |
<small style="float:right">powered by: <a href="http://it.dennyhalim.com/2009/11/park-and-monetize-idle-domains.html">park-domain.php</a></small> | |
<iframe src="<?php echo $arahkan; ?>" width="100%" height="10000" SCROLLING="no" FRAMEBORDER="0"> | |
<script type="text/javascript">window.location.href="<?php echo $arahkan; ?>";</script> | |
if you're not redirected, <a href="<?php echo $arahkan; ?>">click here to continue</a> | |
</iframe> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TTL 1H | |
@ IN SOA @ none. ( 11 1D 1H 1W 3H ); | |
IN NS @ | |
IN CNAME dennyhalim.com. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment