Basecamp api usage in cakephp,it is working..but need modifications because of code duplicay