halifax123
Power Member
- Aug 5, 2008
- 594
- 66
hey fellow roomates, :rain:
I'm trying to get my mind around a script
it's for a redirector code ...my only "similar" experience, was using
a double meta refresh once prior about a yr ago, with that code I made
my link point to a "php 2" folder that pointed to "php 1" then to
the main index
if I recall correctly that is
but the code I pasted below doesn't come with enough explanation
and I'm not tech minded enough to deduce the proper
implementation of the code and put it into use
does it use a separate "php" script? or do I just
incorporate part of the script into the index?
and if it is a simple incorporation, if I had as an example 4
directory folders on my site(4 pages) what might I place on the individual
code of each one? (as you can see I'm stumped!)
(I'm confused and would greatly appreciate any
direction or suggestion.....)(I am the "appendix" of tech! :help
I did use a wordpress version that I was able to successfully get to work
but it was a plugin that had simple easy to follow directions
but bviously this is a different animal altogether
thank you very much for considering with any post or assistance
Hali~!
......... :becky:
:stupid:
I'm trying to get my mind around a script
it's for a redirector code ...my only "similar" experience, was using
a double meta refresh once prior about a yr ago, with that code I made
my link point to a "php 2" folder that pointed to "php 1" then to
the main index
if I recall correctly that is
but the code I pasted below doesn't come with enough explanation
and I'm not tech minded enough to deduce the proper
implementation of the code and put it into use
does it use a separate "php" script? or do I just
incorporate part of the script into the index?
and if it is a simple incorporation, if I had as an example 4
directory folders on my site(4 pages) what might I place on the individual
code of each one? (as you can see I'm stumped!)
(I'm confused and would greatly appreciate any
direction or suggestion.....)(I am the "appendix" of tech! :help
PHP:
<?php
//Standalone CPA Redirector v2
//Settings
$magic_number = 1234; // Any number you choose except ZERO!
$cpa_offer_url = 'http://www.google.com';
//Don't edit below this line unless you know what you are doing.
if (isset($_GET['mn']) && $_GET['mn']==$magic_number){
echo '<html><head></head><body><form action="' . 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] . '" method="post" id="form1">
<input type="hidden" name="mn" value="' . $magic_number . '" /></form>
<script language="JavaScript">
document.getElementById(\'form1\').submit();</script></body></html>';
return true;
exit();
}
if ($_POST['mn']==$magic_number){
echo '<html><head></head><body><form action="' . 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] . '" method="post" id="form1">
<input type="hidden" name="mn" value="' . $magic_number . $magic_number . '" /></form>
<script language="JavaScript">
document.getElementById(\'form1\').submit();</script></body></html>';
return true;
exit();
}
$dom = preg_replace( "/^www\./", "", $_SERVER[ 'HTTP_HOST' ] ) ;
$ref= $_SERVER['HTTP_REFERER'];
if (((strpos($ref, $dom)!=FALSE) || (trim($ref)=="" ) ) && ($_POST['mn']==$magic_number.$magic_number)){
header( 'Location: ' . $cpa_offer_url);
exit();
}
?>
<html>
<head>
<title>Your supposed Landing Page</title>
</head>
<body>
<br><br><br><br>
<center><h1>Your supposed Landing Page</h1></center>
</body>
</html>
I did use a wordpress version that I was able to successfully get to work
but it was a plugin that had simple easy to follow directions
but bviously this is a different animal altogether
thank you very much for considering with any post or assistance
Hali~!
:stupid: