$timeSec = GtTime_GetGmtTimeSec(); //Test link list //$link="http://atedev.wordpress.com/2007/11/23/%E6%AD%A3%E8%A6%8F%E8%A1%A8%E7%A4%BA%E5%BC%8F-regular-expression/"; //$link="http://api.jquery.com/keyup/"; //$link="http://tw.yahoo.com"; //$link="http://www.ettoday.net/news/20140427/351031.htm"; //$link=urldecode("http%3a%2f%2fgoo.gl%2fLZbaPp"); //$link="https://www.facebook.com/robotclubtw"; //$link="http://tw-leaderg.leadergstaging.com/forum/index?sn=1093"; //$link="http://share.hothk.com/2014/05/blog-post_9622.html?m=1&_=1400228348899"; //$link="http://en.wikipedia.org/wiki/Caelum"; //$link="http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/8682091.shtml"; //$link="https://tw.news.yahoo.com/%E7%82%BA8%E5%8D%83%E5%85%83%E7%94%B7%E5%8B%92%E6%96%83%E5%A5%B3%E5%90%8C%E4%BA%8B-%E7%88%B6%E8%A6%AA%E7%97%9B%E6%89%B9-%E5%AF%A6%E5%9C%A8%E5%A4%AA%E5%8F%AF%E6%83%A1%E4%BA%86-080133415.html"; //$link="http://udn.com/NEWS/MAINLAND/MAI1/"; //Main code $og1 = new og(); //ob_start(); //Time test //$time_start = microtime(true); if (test_link($link)) { parser_link($link, $result); } //$time_end = microtime(true); //$time = $time_end - $time_start; //echo "Function in $time seconds\n"; //$time_end2 = microtime(true); //$time = $time_end2 - $time_end; //echo "Function in $time seconds\n"; $og1->show_og_content(); if ($og1->image != "none") { $og1->get_og_image($og1->image);
//$link="http://en.wikipedia.org/wiki/Caelum"; //$link="http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/8682091.shtml"; //$link="https://tw.news.yahoo.com/%E7%82%BA8%E5%8D%83%E5%85%83%E7%94%B7%E5%8B%92%E6%96%83%E5%A5%B3%E5%90%8C%E4%BA%8B-%E7%88%B6%E8%A6%AA%E7%97%9B%E6%89%B9-%E5%AF%A6%E5%9C%A8%E5%A4%AA%E5%8F%AF%E6%83%A1%E4%BA%86-080133415.html"; //$link="http://udn.com/NEWS/MAINLAND/MAI1/"; //$link="http://www.ctitv.com.tw/news_video_c148v172812.html"; //$link="http://www.bbc.co.uk/zhongwen/trad/science/2014/06/140602_solar_airplane.shtml"; //$link="http://www.bbc.co.uk/zhongwen/trad/weather/"; //$link="http://www.cool3c.com/article/81507"; //$link="http://trendsfolio.com/2014/06/seeme-lets-members-create-t-shirts-designs-launches-first-app/"; //Main code-------------------------------- //1. Build a new class //2. Test link & get og info. //3. show og content //4. save og image //5. save og image to uploader in uploader.php $og1 = new og(); //Time test //$time_start = microtime(true); if (test_link($link)) { parser_link($link, $result); } //$time_end = microtime(true); //$time = $time_end - $time_start; //echo "Function in $time seconds\n"; //$time_end2 = microtime(true); //$time = $time_end2 - $time_end; //echo "Function in $time seconds\n"; $og1->show_og_content(); //if($og1->image!="none") //$og1->get_og_image($og1->image); //$og1->get_og_imageToUploader($og1->image);