使用PHP调整图像大小

this is my code:

$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>";

And I need to resize the $image (or atleast get link - src), can you help me, please?