Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. function convert_steamid_to_accountid($steamid)
  2. {
  3. $toks = explode(":", $steamid);
  4. $odd = (int)$toks[1];
  5. $halfAID = (int)$toks[2];
  6.  
  7. $authid = ($halfAID*2) + $odd;
  8. echo $authid;
  9. }
  10.  
  11. <INPUT TYPE = "Text" VALUE ="ENTER STEAM:ID" NAME = "idform">
  12.  
  13. <?PHP
  14. $_POST['idform'];
  15. $steamid = $_POST['idform'];
  16. ?>
  17.  
  18. <form method="POST" action="foo.php">
  19. <input type="text" value="ENTER STEAM:ID" name="idform" />
  20. <input type="submit" />
  21. </form>
  22.  
  23. <?php
  24. function convert_steamid_to_accountid($steamid)
  25. {
  26. $toks = explode(":", $steamid);
  27. $odd = (int)$toks[1];
  28. $halfAID = (int)$toks[2];
  29.  
  30. $authid = ($halfAID*2) + $odd;
  31. echo $authid;
  32. }
  33.  
  34. $id = $_POST['idform'];
  35. convert_steamid_to_accountid($id)
  36. ?>
  37.  
  38. if ($_SERVER['REQUEST_METHOD']=='POST'){
  39. // your php code here that should be executed when the form is submitted.
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement