Skip to content

Instantly share code, notes, and snippets.

@hpatoio
Created October 25, 2012 16:11
Show Gist options
  • Save hpatoio/3953726 to your computer and use it in GitHub Desktop.
Save hpatoio/3953726 to your computer and use it in GitHub Desktop.
Api call
<?php
$ch = curl_init("http://assetic.servergrove.com/yuicompressor.json");
$encoded = "charset=UTF-8&in=%2Ftmp%2FYUI-IN-YdSk7U&out=%2Ftmp%2FYUI-OUT-AzeVJU&type=css&content=%23mapCanvas+img+%7B%0A++max-width%3A+none%3B%0A%7D%0A%0Abody+%7B%0A++padding-top%3A+90px%3B%0A%7D%0A";
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
print_r($output);
echo "\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment