Guest User

Untitled

a guest
Jan 17th, 2018
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. http://username:password@example.com/rss.php
  2.  
  3. id username rss_key
  4. 1 user_a 49f0bad29968
  5. 2 user_b 1f2414c23a7d
  6. 3 user_c 9bc46e8e52ad
  7.  
  8. http://example.com/rss.php?Key=1f2414c23a7d
  9.  
  10. <?php
  11.  
  12. $GetKey = addslashes($_GET['Key']);
  13.  
  14. //Other Rules --- Example: if(empty($GetKey)) { echo "error"; exit(); }
  15.  
  16. include("connect.php"); //Your connection file
  17.  
  18. include("session.php"); //Your session file
  19.  
  20. $Username = $User['username']; //in session file
  21.  
  22. $Match = Mysqli_Fetch_Array(Mysqli_Query($con, "SELECT u.rss_key AS 'RSSKey' WHERE user_table_name AS u WHERE u.username='".$Username."'");
  23.  
  24. if($Match['RSSKey'] !== $GetKey)
  25. {
  26.  
  27. //Stop page
  28. exit();
  29.  
  30. }
  31. else{
  32.  
  33. //Your RSS Code...
  34.  
  35. }
  36.  
  37. ?>
Add Comment
Please, Sign In to add comment