Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在PHP中使用Noembed进行链接预览_Php - Fatal编程技术网

如何在PHP中使用Noembed进行链接预览

如何在PHP中使用Noembed进行链接预览,php,Php,我发现noembed是embed.ly的免费替代品 但没有使用其服务的文档 有人能帮我在PHP中使用NoEmbed并从JSON返回中获取Thumb链接吗 (我认为使用CURL可以解决这个问题,但我对CURL知道的不多,我在看你,没有CURL:首选)就是你想要的 这个例子应该是不言自明的 $json=file\u get\u contents('http://noembed.com/embed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE

我发现noembed是embed.ly的免费替代品 但没有使用其服务的文档

有人能帮我在PHP中使用NoEmbed并从JSON返回中获取Thumb链接吗

(我认为使用CURL可以解决这个问题,但我对CURL知道的不多,我在看你,没有CURL:首选)

就是你想要的

这个例子应该是不言自明的

$json=file\u get\u contents('http://noembed.com/embed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE');
变量转储(json解码($json)->缩略图url);

显示您需要提出什么请求,以及您将得到什么样的数据结构。您还需要什么文档?使用不同语言进行HTTP请求的正确请求示例Show以语言X进行HTTP请求,您应该能够自己进行研究。不要期望在“使用”HTTP的任何地方都能明确地记录这些基础知识。