Im using this code for wordpress to show external hosted images as thumbnails, it works fine but i cant find a way to change width and height.
code is located in function.php
Code: 
function getImage($num) {
global $more;
$more = 1;
$link = get_permalink();
$content = get_the_content();
$count = substr_count($content, '<img');
$start = 0;
for($i=1;$i<=$count;$i++) {
$imgBeg = strpos($content, '<img', $start);
$post = substr($content, $imgBeg);
$imgEnd = strpos($post, '>');
$postOutput = substr($post, 0, $imgEnd+1);
$postOutput = preg_replace('/width="([0-9]*)" height="([0-9]*)"/', '',$postOutput);;
$image[$i] = $postOutput;
$start=$imgEnd+1;
}
if(stristr($image[$num],'<img')) { echo '<a href="'.$link.'">'.$image[$num]."</a>"; }
$more = 0;
}
I tried editing this fields but doesnt work :
width="([0-9]*)" height="([0-9]*)



code used to call function

Code: 
<?php getImage('1'); ?>
bxflow Reviewed by bxflow on . PHP Resize? Im using this code for wordpress to show external hosted images as thumbnails, it works fine but i cant find a way to change width and height. code is located in function.php function getImage($num) { global $more; $more = 1; $link = get_permalink(); $content = get_the_content(); $count = substr_count($content, '<img'); $start = 0; Rating: 5