Redirect Activation Link to another Page

Discussion in 'PHP' started by romioaa, Feb 16, 2014.

  1. #1
    I want user when click download it should verify URL and redirect to another page... where is the error please help me


    This is an Activation URL that user receive on email:

    http://members.growthrank.com/confirm-email/?url=http://feedburner.google.com/fb/a/mailconfirm?k=WkgxvBGhyG3OhX4Hswo5kOQ8Kc4
    PHP:
    Header TAG:
    <body <?php body_class(); ?> <?php if($post->ID == '180'){ ?>onLoad='urlAssign()'<?php } ?> >
    PHP:

    Content Code:
    Click Below
    
    <a id="sub_link" onclick="frmsubmit()" href="javascript:;" target="_blank"> Download </a>
    PHP:

    Footer TAG
    —–start code——-
    
    <?php if($post->ID == '180'){ ?>
    <script type=”text/javascript”>
    function frmSubmit(){
    window.location='pottyblog.biz/wp-profiteer.zip';
    }
    
    function urlAssign(){
    document.getElementById('sub_link').href=document.getElementById('fb_url').value;
    }
    </script>
    <input type='hidden' name='fb_url' id='fb_url' value="<?php echo $_REQUEST['url']; ?>" />
    <?php } ?>
    
    —–end code——-
    
    PHP:

     
    Last edited: Feb 16, 2014
    romioaa, Feb 16, 2014 IP
  2. loop

    loop Active Member

    Messages:
    519
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    90
    #2

    put <input type='hidden' name='fb_url' id='fb_url' value="<?php echo $_REQUEST['url']; ?>" /> before <script> tag:

    <input type='hidden' name='fb_url' id='fb_url' value="<?php echo $_REQUEST['url']; ?>" />
    <?php if($post->ID == '180'){ ?>
    <script type=”text/javascript”>
    function frmSubmit(){
    window.location='pottyblog.biz/wp-profiteer.zip';
    }

    function urlAssign(){
    document.getElementById('sub_link').href=document.getElementById('fb_url').value;
    }
    </script>
    <?php } ?>
     
    loop, Feb 17, 2014 IP
  3. romioaa

    romioaa Notable Member

    Messages:
    1,368
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    200
    #3
    Not working
     
    romioaa, Feb 17, 2014 IP
  4. loop

    loop Active Member

    Messages:
    519
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    90
    #4
    It working at me: http://zodumil.com/popunder/test.php?url=http://feedburner.google.com/fb/a/mailconfirm?k=WkgxvBGhyG3OhX4Hswo5kOQ8Kc4

    See page source

    You have one error here :

    <a id="sub_link" onclick="frmsubmit()" ..

    it should be

    <a id="sub_link" onclick="frmSubmit()" ...
     
    loop, Feb 19, 2014 IP
  5. romioaa

    romioaa Notable Member

    Messages:
    1,368
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    200
    #5
    romioaa, Feb 19, 2014 IP
  6. Webox

    Webox Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    I recommend you to check is it real with PHP code.
    <?php
    
    #CHECKING
    if($SOMETHING == TRUE) {
      ?>
    <script type="text/javascript">
       window.location = "http://www.yoursite.com/filename.rar"
    </script>
    <?php
    } else {
      #NOT GOOD
      die("Hacking attempt!");
    }
    
    ?>
    PHP:
    Hope it helps!
     
    Webox, Feb 19, 2014 IP
  7. loop

    loop Active Member

    Messages:
    519
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    90
    #7
    this symbol make you problems: ”

    so instead <script type=”text/javascript”>

    use

    <script type='text/javascript'>

    and it will work, just tested.
     
    loop, Feb 19, 2014 IP