Advertisement
lowheartrate

discord/index.php

Mar 30th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php require 'connect_discord_oauth.php'; $user_discordID = getUserId($_GET['code']); ?>
  2. <script type="text/javascript">
  3. // set parent to #discord_id
  4. let parent = window.parent.document.getElementById('discord_id');
  5.  
  6. // set parent value to users discord client id
  7. parent.value = <?php echo $user_discordID; ?>
  8.  
  9. // if value of input#discord_id = code...
  10. if(parent.value == <?php echo $user_discordID; ?>) {
  11.    
  12.   // close window
  13.   close();
  14.  
  15. }
  16. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement