Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. if(apache_response_headers()[Authentication] == ""){
  4.  
  5. $uid = $_GET['uid'];
  6.  
  7.  
  8.  
  9. $link = mysqli_connect('localhost', 'pgsplayer', 'pgsplayer', 'pgsplayers');
  10. if (!$link) {
  11. die('Could not connect: ' . mysql_error());
  12. }
  13.  
  14. $pgs_player = mysqli_query($link,"SELECT SQL_CALC_FOUND_ROWS * FROM pgs_player WHERE uid='$uid'");
  15.  
  16.  
  17. if(mysqli_num_rows($pgs_player) > 0 ){
  18.  
  19.  
  20.  
  21. while ($row = mysqli_fetch_array($pgs_player)) {
  22.  
  23.  
  24. echo(json_encode($row['guid']));
  25. }
  26. }else{
  27.  
  28. json_encode("notfound");
  29. }
  30. }
  31. else{
  32. echo "brak autoryzacji";
  33. }
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement