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

Anyone with PHP skill could recreate this?

Discussion in 'PHP & Perl' started by SpecialOne, Dec 1, 2014.

  1. SpecialOne

    SpecialOne Registered Member

    Joined:
    Jan 12, 2011
    Messages:
    65
    Likes Received:
    21
    As you know PHP can not be ripped with any software since it server side. I wonder if somebody could recreate this with PHP:

    1)

    1.png

    2)

    2.png


    These 2 codes should be random numbers after every page refresh. It is simple as you can see but my PHP knowledge is so bad. Should be quick for someone who knows PHP.
     
  2. T0NYS

    T0NYS Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 21, 2014
    Messages:
    1,293
    Likes Received:
    997
    Gender:
    Male
    Post on Hire a Freelancer section
     
  3. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    950
    Likes Received:
    662
    Occupation:
    Web/Bot Developer
    Just sent you a PM.
     
  4. Tobbe co

    Tobbe co Junior Member

    Joined:
    Sep 29, 2014
    Messages:
    171
    Likes Received:
    139
    OP, are you looking to add any function to this? Just displaying a random number is easy. Take this code:
    Code:
    http://www.site.com/?ref=<?php echo rand(100000,1000000);?>
    Where the first number is the lowest value, and the second is the highest value.
    So the above code will show a random number between 100,000 and 1,000,000.
    Note that this will only display the number, if you want it to function with an actual affiliate system, it a whole other story.

    EDIT
    If you want to show the number at multiple places you could easily add the random number to a variable, like this:
    Code:
    <?php $random = rand(100000,1000000);?>
    This is a random number <?php echo $random;?>, and here it's again: <?php echo $random;?>
    
     
    • Thanks Thanks x 1
    Last edited: Dec 1, 2014
  5. SpecialOne

    SpecialOne Registered Member

    Joined:
    Jan 12, 2011
    Messages:
    65
    Likes Received:
    21
    Simple, effective and it is exactly what I needed. On Fiverr some wannabe coders wanted to rip me off 3 Gigs for this. Could you believe? Thx for helping me out ;)