Need a Quick PHP Script - 10 Minute Job - $25

Discussion in 'Programming' started by SUP3RNOVA, Dec 19, 2007.

  1. #1
    For someone that knows PHP this will probably be the easiest $20 of your life.

    I have a site where I link to other sites. I have a link.php page, where on my site I link to the link.php, and from that it pulls other URLs that I want to send my site to. So on my page I link to "link.php?id=google", and it links to whatever I set "go" to in my link.php file.

    I need something programmed that will take my link.php?id=google, and instead of redirecting it to one place, I need it redirected to multiple URLs. I need to be able to change the percentage of links. So say I have 5 links. I want to be able to have link.php?id=google redirect to Google.com 50/100, Yahoo.com 25/100, MSN.com 15/100, and Ask.com 10/100 times.

    My guess is that it's a simple "if" command in the link.php file. Just PM me if you want the job and I'll send you what the link.php looks like. Once it's done I'll pay you 25 bucks.

    Here's what the link.php file looks like :
    
    <?php
    $path = array(
    'google' => 'http://www.google.com',
    'misc' => 'http://forums.digitalpoint.com'
    );
    
    $id = htmlspecialchars($_GET['id']);
    $ovkey = htmlspecialchars($_GET['ovkey']);
    $filename = './logs/' . $id . '.log';
    
    
    
    
    $content = 'JUMP, ' . $_SERVER["REMOTE_ADDR"] . ', ' . date("h:iA") . ', ' . date("Y-m-d") . ', ' . $ovkey;
    
    $handle = fopen($filename, 'a');
    fwrite($handle, "$content\r\n");
    fclose($handle);
    
    if (array_key_exists($_GET['id'],$path))
    header('Location:'.$path[$_GET['id']].'?sub=y_'.$key.'-'.$ovkey);
    
    ?>
    
    Code (markup):
     
    SUP3RNOVA, Dec 19, 2007 IP
  2. ehlokoen

    ehlokoen Peon

    Messages:
    161
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    PM'ed you ... :)
     
    ehlokoen, Dec 19, 2007 IP
  3. SUP3RNOVA

    SUP3RNOVA Peon

    Messages:
    708
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    The job is currently being taken care of. Thanks for all PMs.
     
    SUP3RNOVA, Dec 19, 2007 IP
  4. RoXur777

    RoXur777 Peon

    Messages:
    59
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Your script may have a minor security issue.
     
    RoXur777, Dec 19, 2007 IP
  5. hogan_h

    hogan_h Peon

    Messages:
    199
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    It's bit late, posting now just for info, the job got done by me.
     
    hogan_h, Dec 20, 2007 IP