I need this code turned into PHP

Discussion in 'PHP' started by snotb4ll, Jul 10, 2009.

  1. #1
    Ok I have this code that is in Java script.

    Just one problem. I need it to do the same thing it does but only with PHP code.

    Can anyone help me out?

    Here is the code.

    <script type="text/javascript">

    var i=700

    var x=1



    for (x=0; x <= 1; x++){

    i=700

    while (i<=1000)

    {

    window.open("http://xxxxxxx.com/clicks3.php?seed="+ i +"&adid="+ i +"&userid=xxxxxx",'mywindow','width=800,height=600,resizable=yes,location=yes')

    i=i+1

    }

    }

    </script>
     
    snotb4ll, Jul 10, 2009 IP
  2. Mano2

    Mano2 Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    the window.open cannot be turned into PHP I think
     
    Mano2, Jul 10, 2009 IP
  3. snotb4ll

    snotb4ll Peon

    Messages:
    273
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I really just need this script to get random numbers where 700 and 1,000 are. If that can be done in java it would work for me.

    So where 700 and 1,000 are instead of it going from 700 to 1000 it would just put some random number there over and over again.
     
    snotb4ll, Jul 10, 2009 IP
  4. dannywwww

    dannywwww Well-Known Member

    Messages:
    804
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    110
    #4
    So you just want a number in-between 700 - 1,000?
    
    <?php
    $random = rand(700, 1000);
    echo $random;
    ?> 
    
    PHP:
    If you need to use a window.open you could just echo the number out <?php echo $random; ?> in the url of the window.open.
     
    dannywwww, Jul 10, 2009 IP
  5. stOK

    stOK Active Member

    Messages:
    114
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    You sure you need spam user with 300 windows open?
     
    stOK, Jul 11, 2009 IP