- substr: documentation ( source)
- var_dump: documentation ( source)
- md5: documentation ( source)
<?php
$hash = 'x,x/b2m5kaaj=i46+M#';
// Good URL from c4 -- Works :)
// user/41.02d5743c.200x200o.3e7c6cd0544f.png
var_dump(substr(md5('user/41.02d5743c.200x200o.png' . $hash), 0, 12));
// Example from your mail - bad data!
// user/1906698.8482bae0.200x200o.46e9c046f2d9.jpeg
var_dump(substr(md5('user/1906698.8482bae0.200x200o.jpeg' . $hash), 0, 12));