adspace44

FOR UAF : SOURCE CODE FOR PROXY #2

Apr 18th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. $JSONReceived = file_get_contents("php://input");
  4.  
  5. $Array = json_decode($JSONReceived, true);
  6.  
  7. $userID = intval($Array['userID']);
  8.  
  9. $servername = "mysql.hostinger.co.uk";
  10. $username = "---";
  11. $password = "---";
  12. $dbname = "---";
  13.  
  14. // Create connection
  15. $conn = new mysqli($servername, $username, $password, $dbname);
  16. // Check connection
  17. if ($conn->connect_error) {
  18. die("Connection failed: " . $conn->connect_error);
  19. }
  20.  
  21. $sql = "SELECT exiles FROM Disi_Logs WHERE userID=$userID";
  22. $result = $conn->query($sql);
  23.  
  24. if ($result->num_rows > 0) {
  25. // output data of each row
  26. while($row = $result->fetch_assoc()) {
  27. echo $row["exiles"];
  28. }
  29. } else {
  30. echo "error";
  31. }
  32.  
  33. ?>
Add Comment
Please, Sign In to add comment