title: how can I read cookies, that were set by domain A, from domain B via an inline javascript attached in domain B?
body: <p>I'm trying to read cookies that were set by domain A (i know the name of the cookies), from domain B via an inline javascript code placed in domain B.</p>
  
  <p>domain B inline javascript code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          /* * * DON'T EDIT BELOW THIS LINE * * */
          (function() {
              var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
              dsq.src = 'http://domainA.com/classifiead/embed.js';
              (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
          })();
  
      &lt;/script&gt;
  </code></pre>
  
  <p><a href="http://domainA.com/classifiead/embed.js" rel="nofollow">http://domainA.com/classifiead/embed.js</a> contains:</p>
  
  <pre><code>     $("#jsonpbtn2").click(function() {
  
     var url = 'http://domainA.com/classifiead/content2.php?callback=?'; 
    //  var id = info;
     $.getJSON(url, null, function(data) {
                   $('#textDiv').append(data.somecookie);
       });
  });
  </code></pre>
  
  <p><a href="http://domainA.com/classifiead/content2.php" rel="nofollow">http://domainA.com/classifiead/content2.php</a> contains:</p>
  
  <pre><code>&lt;?php 
   header('Content-type: application/json');
   header('Access-Control-Allow-Origin: *');
   header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
   header("Access-Control-Allow-Credentials: true");
   header("Access-Control-Allow-Headers: Content-Type, *");
   header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
  
   $rtnjsonobj-&gt;id = 'test skdfbslkdj';
   $rtnjsonobj-&gt;somecookie =$_COOKIE['thisweb_last_75'];
  echo $_GET['callback']. '('. json_encode($rtnjsonobj) . ')';  
  </code></pre>
  
  <p>?></p>
  
  <p>Is this even possible?</p>