【问题标题】:Get price for item on steam community market [closed]在 Steam 社区市场上获取商品的价格 [关闭]
【发布时间】:2014-09-21 19:04:33
【问题描述】:

我正在尝试以某种方式在 Steam 社区市场上获得一件物品的最低价格,但我似乎没有在 Steam Web API 中看到解决方案。

所以我希望你们中的一个聪明的头脑有一个解决方案?

http://steamcommunity.com/market/listings/730/AK-47%20%7C%20Vulcan%20%28Battle-Scarred%29

例如。在那个网站上,我希望在 PHP 中返回的最低拍卖价格。

甚至在 Objective C 中做这件事也很棒,谢谢。

【问题讨论】:

    标签: php steam steam-web-api


    【解决方案1】:

    这就是你获得第一页价格的方法,找出货币/循环扔页面/排序它们的方法,你就完成了。

    <?php
    $string = file_get_contents('http://steamcommunity.com/market/listings/730/AK-47%20|%20Vulcan%20%28Battle-Scarred%29');
    $attrList = explode('<span class="market_listing_price market_listing_price_with_fee">',$string);
    $N=count($attrList);
    for ($i=1;$i<$N;$i++){
        $prices[$i-1] = explode('</span>',$attrList[$i])[0];
    }
    print_r($prices);
    ?>
    

    【讨论】:

      猜你喜欢
      • 2015-07-06
      • 2014-05-28
      • 1970-01-01
      • 2016-03-22
      • 1970-01-01
      • 2015-01-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多