1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can somebody help me with a simple PHP questions please

Discussion in 'Black Hat SEO' started by RumMonkey, Dec 2, 2009.

  1. RumMonkey

    RumMonkey Junior Member

    Joined:
    Jan 8, 2009
    Messages:
    150
    Likes Received:
    224
    Occupation:
    no
    Hi, I'm goin to be sending traffic to a php redirect on my site, I'm currently using this:

    How can I add another link to that script so that it opens two windows?

    Thanks in advance
     
  2. hade

    hade Registered Member

    Joined:
    Jul 25, 2008
    Messages:
    79
    Likes Received:
    26
    You can only do that by loading a page and using javascript to open the second window. Then you'd probably use javascript to redirect the main window too.
    Posted via Mobile Device
     
  3. rrorchid

    rrorchid Newbie

    Joined:
    Oct 26, 2009
    Messages:
    27
    Likes Received:
    4
    in hxxp://www.myaffiliatelink.com:

    PHP:
    <script type="text/javascript">
    function 
    open_win(thisurl)
    {
    window.open(thisurl,"_blank","resizable=yes)
    }
    </script>

     <body onload="
    open_win(nameofpageyouwanttoload)">
     
    • Thanks Thanks x 1
  4. RumMonkey

    RumMonkey Junior Member

    Joined:
    Jan 8, 2009
    Messages:
    150
    Likes Received:
    224
    Occupation:
    no
    thanks for that :)

    But which part do i replace with affiliate link 1

    and which do i replace with affiliate link 2?



     
  5. goawayplease

    goawayplease Regular Member

    Joined:
    Apr 10, 2008
    Messages:
    299
    Likes Received:
    67
    You would use PHP to output that HTML to the screen, using PHP to set the URL in the body onload.


    Something like
    Code:
    <?php
    $id = $_GET['id'];
    
    switch($id)
    {
       case 0:
         $url = 'yourafflink0';
         break;
    
       case 1:
         $url = 'yourafflink1';
         break;
    
       default:
         $url = 'http://google.com'; // bad campaign, get them out of here
    };
    
    ?>
    <html>
    <head>
    
    <script type="text/javascript">
    function open_win(thisurl)
    {
    window.open(thisurl,"_blank","resizable=yes)
    }
    </script>
    </head>
     <body onload="open_win(<?php echo $url; ?>)"> 
    </body>
    </html>
    
     
    • Thanks Thanks x 1
    Last edited: Dec 2, 2009