$request = new HttpRequest();
$request->setUrl('http://dlj.bz/api/urlshortener');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$request->setBody('{"long_url": "http://www.sina.com.cn"}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}