forked from SzymonLisowiec/php-steamlogin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
30 lines (25 loc) · 676 Bytes
/
example.php
File metadata and controls
30 lines (25 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
define('php-steamlogin', true);
require('main.php');
$SteamLogin = new SteamLogin(array(
'username' => '',
'password' => '',
'datapath' => dirname(__FILE__) //path to saving cache files
));
if($SteamLogin->success){
$logindata = $SteamLogin->login();
/*
$logindata = array(
'steamid' => 'xxx', //64-bit
'sessionId' => 'xxx',
'cookies' => 'xxx=xxx; yyy=yyy; '
);
*/
//You can view steamcommunity.com from created session
//$SteamLogin->view('http://steamcommunity.com/id/pandeu');
//Sending tradeoffers: https://github.com/halipso/php-steam-tradeoffers
if($SteamLogin->error != '') echo $SteamLogin->error;
}else{
echo $SteamLogin->error;
}
?>