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

Need a simple PHP script coded

Discussion in 'Hire a Freelancer' started by phatzilla, Dec 11, 2012.

  1. phatzilla

    phatzilla Supreme Member

    Joined:
    Apr 9, 2009
    Messages:
    1,365
    Likes Received:
    1,017
    I'm not a PHP guy but im pretty sure this should be possible and simple to do:

    Basically i want a PHP script that whenever anything sends a GET/POST request to it, it will pickup the exact request(raw) and save it in a txt file for later review. I would like to see the raw request exactly as it was sent to the php script / server. Hit me up if you can do this for me
     
    Last edited: Dec 12, 2012
  2. Superconservativenes

    Superconservativenes Registered Member

    Joined:
    Dec 9, 2012
    Messages:
    85
    Likes Received:
    29
    I'm currently on my iPhone right now, but when I get home I will contact you as soon as I can.
     
  3. merc123

    merc123 Newbie

    Joined:
    Nov 12, 2012
    Messages:
    35
    Likes Received:
    6
    Are you using forms or is this a link folks are redirecting to?
     
  4. ocheretko

    ocheretko Newbie

    Joined:
    May 13, 2009
    Messages:
    6
    Likes Received:
    1
    Location:
    Ukraine
    maybe you want such a script? He writes post and get requests to files and post.txt get.txt


    Result: get.txt (or post.txt) record:
    param1: black
    param2: green
    PHP:
    function fsave($content,$fileName) {
        
    $open=fopen($fileName,"a");
        
    fwrite($open,$content."\n");
        
    fclose($open);         
    }

    foreach (
    $_GET as $key => $value) {
        if (
    $key != null) {
            
    fsave($key.':'.$value,'get.txt');
        }
    }

    foreach (
    $_POST as $key => $value) {
        if (
    $key != null) {
            
    fsave($key.':'.$value,'post.txt');
        }
    }
     
    • Thanks Thanks x 1
  5. Zak_A

    Zak_A Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 16, 2008
    Messages:
    808
    Likes Received:
    873
    Gender:
    Male
    Occupation:
    WP designer & developer
    Location:
    Western Europe
    OP, I was about to write it for you, but this is exactly what you needed.
    Thanks ocheretko.
     
  6. emarketnew

    emarketnew Newbie

    Joined:
    Jun 21, 2012
    Messages:
    8
    Likes Received:
    0
    I belive u want something to GET from your form and write a text? maybe if posible to send data to your email?
     
  7. saxgod

    saxgod Regular Member

    Joined:
    Sep 19, 2010
    Messages:
    351
    Likes Received:
    337
    ob_start();
    var_dump($_POST);
    var_dump($_GET);
    var_dump($_SERVER);
    $data = ob_get_contents();
    ob_end_clean();
    file_put_contents("filename.txt",$data);
     
  8. NetCrime

    NetCrime Regular Member

    Joined:
    Mar 9, 2011
    Messages:
    236
    Likes Received:
    103
    Location:
    Lithuania
    Going to scam login/passwords ? :)