Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Double Meta Refresh with Iframe (https://www.warriorforum.com/programming/128060-double-meta-refresh-iframe.html)

angelus_1984 25th September 2009 12:18 PM

Double Meta Refresh with Iframe
 
Hello,

I use double metarefresh to hide the origin of my traffic. Would it still work if I used an iframe without the actual target url but using the initial file for the DMR? Or would this solution leave any footprints?

Thanks.

tguillea 25th September 2009 06:17 PM

Re: Double Meta Refresh with Iframe
 
No it will be traceable. I set up a test script for you to see too.

http://dollarhauler.com/1.php - this is a simple DMR and will bring you from 1.php to 2.php to showinfo.php

http://dollarhauler.com/framed.php - this is a page that frames the page 1.php (which redirects to showinfo.php the same way, but in the frame).

tguillea 25th September 2009 11:13 PM

Re: Double Meta Refresh with Iframe
 
I was looking into this a little more and by using meta redirects rather than php redirects (as I usually do) AND doing a DMR when you load the frame, you can get the frame to hide the referring URL!

file name: 1.php

<?php
PHP Code:

$frame = $_GET['useframe'];
//header('location: 2.php?useframe='.$frame);
echo '<meta http-equiv="refresh" content="0;url=http://dollarhauler.com/2.php?useframe='.$frame.'">';
?> 



file name: 2.php

PHP Code:

<?php
$frame 
= $_GET['useframe'];
if (
$frame == 1){
    echo 
'<meta http-equiv="refresh" content="0;url=http://dollarhauler.com/framed.php?useframe=2">';
    }else{
    echo 
'<meta http-equiv="refresh" content="0;url=http://dollarhauler.com/showinfo.php?useframe='.$frame.'">';
    }
?>

file name: showinfo.php
PHP Code:

<?php
if (getenv(HTTP_X_FORWARDED_FOR)) {
    
$ip = getenv(HTTP_X_FORWARDED_FOR);
    }else{
    
$ip = getenv(REMOTE_ADDR);
    }
$hostname = gethostbyaddr($ip);
echo 
'IP Address: '.$ip.'<br />
Hostname: '
.$hostname.'<br />
<b>REFERRING URL</b>: '
.getenv("HTTP_REFERER");

if (
$_GET['useframe'] >= 1){
    echo 
'<br /><br /><br />
    click here to go to another page within frame (i.e. the second form of an advertiser)
    <br /><br />
    <a href="showinfo.php">Go (loads same file called showinfo.php)</a>'
;
    }
?>

file name: framed.php
PHP Code:

<?php
$frame 
= $_GET['useframe'];
echo 
'<iframe src="1.php?useframe='.$frame.'" width="100%" height="100%"><p>Please update your browser to use iFrames!</p></iframe>';
?>

You can also see that when you click on the link at the bottom, it will give you the referring URL of the page you just requested and is displaying in the iFrame

Viola!

angelus_1984 27th September 2009 07:24 AM

Re: Double Meta Refresh with Iframe
 
That seems pretty cool.

Just one more question about DMR. I always only used 1.php and 2.php whereas 2.php directly redirects to affiliate link. Do I need one more file in between?

I use the following coding:

1st.php

<?php
echo "<meta http-equiv=\"refresh\" content=\"0;url=2nd.php\">";
?>

2nd.php

<?php
$page1 ="http://www.TargetUrl.com";
$referer = $_SERVER['HTTP_REFERER'];
$mypages = array($page1);
$myrandompage = $mypages[mt_rand(0, count($mypages) -1)];
if($referer == "")
{
echo "<meta http-equiv=\"refresh\" content=\"0;url=$myrandompage\">";
}
else
{
echo "<meta http-equiv=\"refresh\" content=\"0;url=1st.php\">";
}
?>


All times are GMT -6. The time now is 12:11 AM.