vemarun/php-steamlogin

Script to obtain steamid, cookies and sessionid.

Installs: 1 124

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 14

pkg:composer/vemarun/php-steamlogin

dev-master 2020-05-07 01:26 UTC

This package is auto-updated.

Last update: 2025-12-07 14:06:49 UTC


README

Script to obtain steamid, cookies and sessionid. Forked from: https://github.com/SzymonLisowiec/php-steamlogin

composer require vemarun/php-steamlogin

Example

<?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/Kysune');
	
	//Sending tradeoffers: https://github.com/halipso/php-steam-tradeoffers
	
	if($SteamLogin->error != '') echo $SteamLogin->error;
}else{
	echo $SteamLogin->error;
}
?>

Public Parameters

  • error
  • success

Public Methods

  • login([$authcode, $twofactorcode]) - login to steam
  • view($url) - print source of $url

Special thanks to

License

MIT-License