PHP code example of thedava / steam-discount-detector

1. Go to this page and download the library: Download thedava/steam-discount-detector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

thedava / steam-discount-detector example snippets


php detect.php
php detect.php <app file 1> <app file 2> <app file ...>

php steam-discount-detector.phar
php steam-discount-detector.phar <app file 1> <app file 2> <app file ...>

user@computer $ php detect.php apps/gta-cash-cards.php

App: gta-cash-cards.php
=======================

Name: GTA Online Cash Cards
Url: http://store.steampowered.com/app/376850/

Output:
--------
[No Discount] Red Shark: GTA$ 100,000 => 2,49€
[No Discount] Tiger Shark: GTA$ 200,000 => 3,99€
[No Discount] Bull Shark: GTA$ 500,000 => 7,49€
[No Discount] Great White Shark: GTA$ 1,250,000 => 14,99€
[DISCOUNT] Whale Shark: GTA$ 3,500,000 => 25,45€ (Original: 37,99€)
[DISCOUNT] Megalodon Shark: GTA$ 8,000,000 => 44,99€ (Original: 74,99€)
--------