code_junkie

Best practices for getting cross-site JSON responses to POST?

Nov 11th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. <?php
  2. // Set header so our output looks like a PNG
  3. header("Content-Type: image/png");
  4.  
  5. // Reflect the image from googles chart API
  6. echo file_get_contents('http://chart.apis.google.com/chart?'.$_SERVER['QUERY_STRING']);
  7. ?>
  8.  
  9. document.domain = 'domain.com';
Add Comment
Please, Sign In to add comment