使用php调整图像大小

时间:2016-06-12 15:36:40

标签: javascript php jquery ajax

这是我的代码:

$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)的大小,你能帮助我吗?

0 个答案:

没有答案