Porting Videos logic to PHP / using transients