首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > PHP > 图书馆有一个网址,把它描述、标题和图片。

图书馆有一个网址,把它描述、标题和图片。

资 源 简 介

This library was built and tested with Kohana PHP v2.4.3. The library gets a URL using the PHP function Curl(), then uses regular expressions to get the title and all the images of sizes greater than 60m2 from the HTML page.Then, the images are then resized to thumbnail and saved. The library also uses the PHP function get_meta_tag() to get the description of the page. The URL is also return. To use the library you need to place the Fetch.php file into the library folder under the kohana application folder. Then instantiate the library in your controller. For example the codes below will display the title, descriptions and links: Sample Usage: $fetch= new Fetch($url); echo $fetch->title(); echo $fetch->description(); echo $fetch->link(); You can use $fetch->image(); for the images. Since the images are return as an array you can loop through using the foreach loop to get the saved thumbnails from the root directory. The library is still undergoing some testing, I

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • WYG 1天前 成为了本站会员

  • Shine 1天前 成为了本站会员

  • 柳贻 1天前 成为了本站会员

  • hallelujah_HL 1天前 成为了本站会员

  • 焦昱贺 1天前 成为了本站会员

  • Rubin 1天前 成为了本站会员

  • Li 2天前 成为了本站会员

  • bigfatcat1977 3天前 成为了本站会员

  • just4down 3天前 成为了本站会员

  • shallow 3天前 成为了本站会员

0.166624s