这是我的代码:
$item = "AK-47 | Redline (Field-Tested)";
$link = "http://steamcommunity.com/market/listings/730/" . str_replace(" ", "%20", $item);
$ret = file_get_contents($link);
$pattern = '/<div class="market_listing_largeimage">(.*)<div id="largeiteminfo">/s';
echo $pattern;
preg_match($pattern, $ret, $res);
$image = str_replace("</div>", "", $res[1]);
echo "<div class='selected__img'>".$image."</div>";
我需要调整$ image(或至少获取链接 - src)的大小,你能帮助我吗?