如何使用 php 从 flickr 和 picasa 视频中提取缩略图
请问谁能帮帮我...
假设您可以在浏览器中看到图像。因此,首先,您需要获取包含图像的链接的链接。
为此,您应该像这样简单地分析查看页面的内容并执行正则表达式匹配;
<?php
ob_start();
$content = ob_get_contents();
function find_all_img_url_in_cur_page(){
global $content;
$result = array();
if ( preg_match('/jpg/i', $content) ){
//find postion and add into array
}
return $result;
}
find_all_img_url_in_cur_page();
ob_end_clean();
?>
那么你需要复制/打开你当前正在处理的这个 IMG 文件(使用通常与 php 捆绑在一起的标准 GD 库)。
谷歌“使用 php 调整图像大小”,所以在你得到你想要的之后