public $feed_id; // string(254) not_null
public $seqid; // int(11) not_null
public $url; // string(254) not_null
+ public $frame_width; // int(11)
+ public $frame_height; // int(11)
+ public $frame_style; // TEXT
+ public $frame_body; // TEXT
/* the code above is auto generated do not remove the tag below */
echo $dir . "\n";
mkdir($dir,0775,true);
}
- $url = 'http://www.redditmedia.com/mediaembed/liveupdate/tnc30xhiiqom/LiveUpdate_' . $x->uid . '/' . $this->seqid;
- $cmd = "/usr/bin/xvfb-run seed app.webkitpdf/main.js -u " . $url . " -d 5000 -H " . $file;
+ //$url = 'http://www.redditmedia.com/mediaembed/liveupdate/tnc30xhiiqom/LiveUpdate_' . $x->uid . '/' . $this->seqid;
+ $url = 'http://roojs.com/reddit/index.php/Embedly?url=' . $this->url;
+ $cmd = "/usr/bin/xvfb-run seed app.webkitpdf/main.js -u " .escapeshellarg( $url ) . " -d 5000 -H " . $file;
echo "\n\n".$file."\n\n";
echo $cmd;
`$cmd`;
// $data = file_get_contents('/home/chris/test_png/test.html');
// print_r(strlen($data));
- $html5Tag = array(
- 'canvas', 'audio', 'embed', 'source', 'track',
- 'video', 'datalist', 'keygen', 'output', 'article',
- 'aside', 'bdi', 'details', 'dialog', 'figcaption',
- 'figure', 'figure', 'footer', 'header', 'main',
- 'mark', 'menuitem', 'meter', 'nav', 'progress',
- 'rp', 'rt', 'ruby', 'section', 'summary', 'time',
- 'wbr');
-// $retData = $data;
-
- $testTag = "/\<(".implode('|', $html5Tag).")/i";
-
- $retData = preg_replace($testTag, "<div", $data);
-
- $testTag = "/\<\/(".implode('|', $html5Tag).")/i";
- $data = preg_replace($testTag, "</div", $retData);
+// $html5Tag = array(
+// 'canvas', 'audio', 'embed', 'source', 'track',
+// 'video', 'datalist', 'keygen', 'output', 'article',
+// 'aside', 'bdi', 'details', 'dialog', 'figcaption',
+// 'figure', 'figure', 'footer', 'header', 'main',
+// 'mark', 'menuitem', 'meter', 'nav', 'progress',
+// 'rp', 'rt', 'ruby', 'section', 'summary', 'time',
+// 'wbr');
+//// $retData = $data;
+//
+// $testTag = "/\<(".implode('|', $html5Tag).")/i";
+//
+// $retData = preg_replace($testTag, "<div", $data);
+//
+// $testTag = "/\<\/(".implode('|', $html5Tag).")/i";
+// $data = preg_replace($testTag, "</div", $retData);
// print_r($data);exit;
//for fix the HTML issue
- $data = tidy_repair_string(mb_convert_encoding($data, 'HTML-ENTITIES', "UTF-8"),array(),'UTF8');
-// print_r($data);exit;
- if($this->debug_on){
- echo "Created tidy.... \n\n";
- echo "<textarea style=\"width: 500px; height: 250px;\">{$data}</textarea>";
- echo "\n\n";
- }
+// $data = tidy_repair_string(mb_convert_encoding($data, 'HTML-ENTITIES', "UTF-8"),array(),'UTF8');
+//// print_r($data);exit;
+// if($this->debug_on){
+// echo "Created tidy.... \n\n";
+// echo "<textarea style=\"width: 500px; height: 250px;\">{$data}</textarea>";
+// echo "\n\n";
+// }
//}
//
- echo "about to do stylesheets\n";
+ //echo "about to do stylesheets\n";
// get stylesheets.
- foreach ($xpath->query('//link[@href]') as $l) {
+
+ /*foreach ($xpath->query('//link[@href]') as $l) {
$this->addStyleSheet($href);
+ }*/
+ echo "about to do iframe\n";
+ foreach ($xpath->query('//iframe') as $f) {
+ $this->frame_width = $f->getAttribute('width');
+ $this->frame_height = $f->getAttribute('height');
+ $this->frame_style = $f->getAttribute('style');
+ $src=$dir . "/" . $f->getAttribute('src');
+
+ $this->frame_body = file_get_contents($src);
+ $this->update();
+ //echo "done";
+ break;
}
//echo "about to do style\n";