CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_USERAGENT => Tweeper::$userAgent,
));
CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_USERAGENT => Tweeper::$userAgent,
));
$json_match_expr = '/window._sharedData = (.*);/';
$ret = preg_match($json_match_expr, $html, $matches);
if ($ret !== 1) {
$json_match_expr = '/window._sharedData = (.*);/';
$ret = preg_match($json_match_expr, $html, $matches);
if ($ret !== 1) {
private function loadStylesheet($host) {
$stylesheet = "file://" . __DIR__ . "/rss_converter_" . $host . ".xsl";
if (FALSE === file_exists($stylesheet)) {
private function loadStylesheet($host) {
$stylesheet = "file://" . __DIR__ . "/rss_converter_" . $host . ".xsl";
if (FALSE === file_exists($stylesheet)) {
public function tweep($src_url, $host=NULL, $validate_scheme=TRUE) {
$url = parse_url($src_url);
if (FALSE === $url) {
public function tweep($src_url, $host=NULL, $validate_scheme=TRUE) {
$url = parse_url($src_url);
if (FALSE === $url) {
return NULL;
}
if (TRUE === $validate_scheme) {
$scheme = $url["scheme"];
if (!in_array($scheme, array("http", "https"))) {
return NULL;
}
if (TRUE === $validate_scheme) {
$scheme = $url["scheme"];
if (!in_array($scheme, array("http", "https"))) {