<?php
   define('USER', 'inese.andersone@gatewaypartners.net');
         define('TOKEN', 'Md63=090f2R6y8ebPbf0r5qeU7uaH4G4NajcbdM2'); 
   require 'Solve360Service.php';
   
   $solve360Service = new Solve360Service(USER, TOKEN);

   $blogId=$_GET["p"];
   $blog = $solve360Service->getProjectblog($blogId);
   $comps[]="$blogId";
   foreach ($blog->relateditems->children() as $comp) {
      if ($comp->typeid==40) {
         $compId=$comp->id;
         $comps[]="$compId";
      }
   }
   
   echo json_encode($comps);
   //echo json_encode(array("name","array","background"));
?>