/** * @param string $html * * @return mixed */ public static function inlineCss($html) { $url = 'http://premailer.dialect.ca/api/0.1/documents'; $data = ['html' => $html, 'preserve_styles' => 'false']; $json = Ajde_Http_Curl::post($url, $data); $result = @json_decode($json); if (is_object($result) && isset($result->documents)) { $url = $result->documents->html; return Ajde_Http_Curl::get($url); } return $html; }
/** * @param string $html * * @return mixed */ public static function inlineCss($html) { $url = 'https://inlinestyler.torchbox.com:443/styler/convert/'; $data = ['returnraw' => '1', 'source' => $html]; return Ajde_Http_Curl::post($url, $data); }