There are a heap of different ways to get at those variable strings. Here's a few which may or may not help! Any questions, just ask. 
PHP Code:
$subject = "set_this_img('http://this.site.com/cp/mnbztxxn/1/2.png', 'Blue');";
// Using sscanf
sscanf($subject, "set_this_img('http://this.site.com/cp/%[a-z]/1/2.png', '%[a-zA-Z]');", $path, $colour);
var_dump($path, $colour);
// Using PCRE
preg_match('~^set_this_img\(\'http://this\.site\.com/cp/([a-z]+)/1/2\.png\', \'([a-z]+)\'\);$~iD', $subject, $match);
list(, $path, $colour) = $match;
var_dump($path, $colour);
// Using string functions
$path = substr($subject, 38, strpos($subject, '/', 38) - 38);
$colour = substr($subject, 58, strpos($subject, "'", 58) - 58);
var_dump($path, $colour);
Bookmarks