洞察探索如何利用 FinClip 提供的跨平台小程序技术,实现高效的支付管理与合规运营
604
2022-10-13
Opengraph:OpenGraph框架协议的一个PHP 5.3+框架(Open Graphics Library)
Opengraph
Test with Atoum
cd Opengraph/curl -s https://getcomposer.org/installer | phpphp composer.phar install --dev./vendor/atoum/atoum/bin/atoum --glob Tests/Units/
Writer
append(Opengraph\Writer::OG_TITLE, 'The Rock');$writer->append(Opengraph\Writer::OG_TYPE, Opengraph\Writer::TYPE_VIDEO_MOVIE);$writer->append(Opengraph\Writer::OG_URL, 'http://imdb.com/title/tt0117500/');$writer->append(Opengraph\Writer::OG_IMAGE, 'http://ia.media-imdb.com/images/rock.jpg');echo $writer->render() . PHP_EOL;?>
Output
Reader
parse(file_get_contents('http://imdb.com/title/tt0117500/'));print_r($reader->getArrayCopy());?>
Output
Array( [og:url] => http://imdb.com/title/tt0117500/ [og:title] => Rock (1996) [og:type] => video.movie [og:image] => Array ( [0] => Array ( [og:image:url] => http://ia.media-imdb.com/images/M/MV5BMTM3MTczOTM1OF5BMl5BanBnXkFtZTYwMjc1NDA5._V1._SX98_SY140_.jpg ) ) [og:site_name] => IMDb [fb:app_id] => 115109575169727)
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~