<img src="......" width="....." height="...."/>

If I've got a function producing the above mentioned code, how do i obtain the width and height characteristics with php?

Would you mean something similar to this ?

So you should use

preg_match_all('/(alt|title|src)=("[^"]*")/i',$img_tag, $img[$img_tag]);

After which foreach these to array.

getimagesize() ?

<?php    
list($width, $height, $type, $attr) = getimagesize("http://example.com/image.gif");
print"Image width is {$width} and height {$height}";
?>