· 6 years ago · Oct 31, 2019, 12:08 AM
1<?php
2include("SteamID.php");
3
4$APIKEY = "0EBBACAEBC6039B06DF1066807D55D4C";
5$WHO = $_GET["id"];
6$str = substr($WHO, 0, 4);
7
8
9
10 $s = SteamID::SetFromURL( $WHO, function( $URL, $Type ) use ( $APIKEY )
11 {
12 $Parameters =
13 [
14 'format' => 'json',
15 'key' => $APIKEY,
16 'vanityurl' => $URL,
17 'url_type' => $Type
18 ];
19
20 $c = curl_init( );
21
22 curl_setopt_array( $c, [
23 CURLOPT_USERAGENT => 'Steam Vanity URL Lookup',
24 CURLOPT_ENCODING => 'gzip',
25 CURLOPT_RETURNTRANSFER => true,
26 CURLOPT_URL => 'https://api.steampowered.com/ISteamUser/ResolveVanityURL/v1/?' . http_build_query( $Parameters ),
27 CURLOPT_CONNECTTIMEOUT => 5,
28 CURLOPT_TIMEOUT => 5
29 ] );
30
31 $Response = curl_exec( $c );
32
33 curl_close( $c );
34
35 $Response = json_decode( $Response, true );
36
37 if( isset( $Response[ 'response' ][ 'success' ] ) )
38 {
39 switch( (int)$Response[ 'response' ][ 'success' ] )
40 {
41 case 1: return $Response[ 'response' ][ 'steamid' ];
42 case 42: header("Location: steamerror.php");
43
44 }
45 }
46
47 throw new Exception( 'Failed to perform API request' );
48
49 } );
50
51
52$id3 = $s->RenderSteam3() . PHP_EOL;
53$idn = $s->RenderSteam2() . PHP_EOL;
54$id64 = $s->ConvertToUInt64() . PHP_EOL;
55
56$json = file_get_contents("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$APIKEY."&steamids=$id64");
57$apidata = json_decode($json);
58$name = $apidata->response->players[0]->personaname;
59$img = $apidata->response->players[0]->avatarfull;
60if (isset($apidata->response->players[0]->realname) == false ){
61 $realname = "N/A";
62} else{
63 $realname = $apidata->response->players[0]->realname;
64}
65
66if (isset($apidata->response->players[0]->loccountrycode) == false ){
67 $country = "N/A";
68} else{
69 $country = $apidata->response->players[0]->loccountrycode;
70}
71$url = $apidata->response->players[0]->profileurl;
72if ($name == null || $img == null ){
73 header("Location: steamerror.php");
74}
75?>
76
77<!DOCTYPE html>
78<html>
79 <head>
80<!-- Site created: 9/19/19
81 Author: DriedSponge(Jordan Tucker) -->
82
83 <?php
84 include("meta.php");
85 ?>
86 <meta name="twitter:card" content="summary_large_image" />
87 <meta name="description" content="Name: <?php echo $name; ?>,SteamID64: <?php echo $id64; ?>, SteamID: <?php echo $idn; ?>, SteamID3: <?php echo $id3; ?>, URL: <?php echo $url; ?>" />
88 <meta name="keywords" content="<?php echo $name; ?>, <?php echo $id64; ?>, <?php echo $idn; ?>, <?php echo $id3; ?>" />
89 <meta property="og:site_name" content="DriedSponge.net | SteamID Finder" /> <!-- Replace with your name or whatever you want-->
90 <meta property="og:title" content="Info on <?php echo $name; ?>" />
91 <meta property="og:image" content="<?php echo $img;?>" />
92 <meta property="og:image:type" content="image/png" />
93 <meta name="author" content="Jordan Tucker">
94 <meta property="og:description" content="SteamID64: <?php echo $id64; ?> SteamID: <?php echo $idn; ?> SteamID3: <?php echo $id3; ?> URL: <?php echo $url; ?>" />
95 <meta property="og:site_name" content="<?php echo $name; ?> - driedsponge.net" />
96 <title><?php echo $name; ?> - driedsponge.net</title>
97
98 <script src="https://kit.fontawesome.com/0add82e87e.js" crossorigin="anonymous"></script>
99
100 <link rel="stylesheet" href = "//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" type="text/css" >
101
102 <style>
103 .url{
104 color: white;
105 text-decoration: underline;
106 }
107 .url:hover{
108 color: rgb(228, 228, 228);
109 text-decoration: underline;
110 }
111
112 </style>
113 </head>
114
115 <body>
116
117 <div class="app">
118 <div class="container-fluid-lg">
119 <div class="page-header">
120
121 <nav class="navbar navbar-expand-lg navbar-dark nbth fixed-top" >
122 <a class="navbar-brand" href="#"><strong>driedsponge.net</strong></a>
123 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarmain" aria-controls="navbarmain" aria-expanded="false" aria-label="Toggle navigation">
124 <span class="navbar-toggler-icon"></span>
125 </button>
126 <div class="collapse navbar-collapse" id="navbarmain">
127
128 <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
129 <li class="nav-item"><a class="nav-link" href="index.php">Home</a></li>
130 <li class="nav-item"><a class="nav-link" href="webdesign.php">Web Projects</a></li>
131 <li class="nav-item"><a class="nav-link" href="lua.php">Lua Projects</a></li>
132 <li class="nav-item"><a class="nav-link" href="tutorials/index.php">Coding Tutorials</a></li>
133 <li class="nav-item active"><a class="nav-link" href="steam.php">Steam Tool<span class="sr-only">(current)</span></a></li>
134 </ul>
135 </div>
136 </nav>
137
138
139 </div>
140
141 </div>
142 <div class="container-fluid-lg" style="padding-top: 80px;">
143
144
145
146 <div class="container">
147
148 <hgroup>
149 <h2><strong>Steam ID Tool</strong></h2>
150 <br>
151
152 <?php
153 include("search.php");
154 ?>
155
156 <br>
157 </hgroup>
158 <div class="jumbotron" style="text-align: center;">
159 <h2><img src="<?php echo $img; ?>"/></h2>
160 <h1>Results for: <?php echo $name; ?></h1>
161 <p class="paragraph"><strong>SteamID64:</strong> <?php echo $id64; ?> <button value="<?php echo $id64; ?>" onclick="copything(this.value)" class="btn btn-success"><i class="far fa-copy"></i></button></p>
162 <p class="paragraph"><strong>SteamID:</strong> <?php echo $idn; ?> <button value="<?php echo $idn; ?>" onclick="copything(this.value)" class="btn btn-success"><i class="far fa-copy"></i></button></p>
163 <p class="paragraph"><strong>SteamID3:</strong> <?php echo $id3; ?> <button value="<?php echo $id3; ?>" onclick="copything(this.value)" class="btn btn-success"><i class="far fa-copy"></i></button></p>
164 <p class="paragraph"><strong>Profile URL:</strong> <a class="url" target="_blank" href="<?php echo $url; ?>"><?php echo $url; ?></a> <button value="<?php echo $url; ?>" onclick="copything(this.value)" class="btn btn-success"><i class="far fa-copy"></i></button></p>
165 <h4 class="subheading" style="color: white;">Personal Info (This may not be accurate)</h4><br>
166 <p class="paragraph"><strong>Real Name:</strong> <?php echo $realname; ?> <button value="<?php echo $realname; ?>" onclick="copything(this.value)" class="btn btn-success"><i class="far fa-copy"></i></button></p>
167 <p class="paragraph"><strong>Country</strong>: <?php echo $country; ?> <button value="<?php echo $country; ?>" onclick="copything(this.value)" class="btn btn-success"><i class="far fa-copy"></i></button> </p>
168
169 </div>
170
171
172
173
174
175
176
177
178 </div>
179</div>
180</div>
181<!-- End of "app" -->
182
183<?php
184include("hex.php");
185 include("footer.php"); // we include footer.php here. you can use .html extension, too.
186 ?>
187
188
189
190
191
192 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
193 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
194 <script src="https://unpkg.com/popper.js@1"></script>
195 <script src="https://unpkg.com/tippy.js@4"></script>
196 <script src="main.js"></script>
197
198
199 <script src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
200 <script>
201 document.getElementById("id64").value = "<?php echo $WHO;?>";
202
203 </script>
204 <script>
205 function copything(value){
206
207
208 navigator.clipboard.writeText(value)
209
210 toastr["success"](value + " was successfully copied to clipboard", "Congradulations!")
211
212 toastr.options = {
213 "closeButton": true,
214 "debug": false,
215 "newestOnTop": false,
216 "progressBar": true,
217 "positionClass": "toast-top-right",
218 "preventDuplicates": true,
219 "onclick": null,
220 "showDuration": "300",
221 "hideDuration": "1000",
222 "timeOut": "5000",
223 "extendedTimeOut": "1000",
224 "showEasing": "swing",
225 "hideEasing": "linear",
226 "showMethod": "fadeIn",
227 "hideMethod": "fadeOut"
228 }
229 }
230
231
232 </script>
233 <script src="search.js"></script>
234 </body>
235
236
237
238
239
240
241</html>