I'm using the code
published (as guide) in vB forum so the code you are "trying to figure out" is not mine

Anyway now it works.
Mooff i'm using ob_start just because it was written in vB forum and the thread has been recently linked by "vBulletin Technical Support Lead" so i thought that it was good.
edit: exactly kh99. There are php and js scripts in the included file
Thanks.