可以将iframe转换为html吗?

时间:2013-01-15 22:04:35

标签: php html iframe seo

是否可以使用PHP将iFrame转换为页面上的HTML(如果这有意义),以便内容可以被搜索引擎索引?我在这里使用电子表格:

http://www.landedhouses.co.uk/offers/

<p><iframe width='700' height='1200' frameborder='0' src='https://docs.google.com/spreadsheet/pub?key=0Ai0rAM-RzQC4dE1hQ2FpdmFoU29POGFUR1NMQUl2RWc&#038;single=true&#038;gid=1&#038;output=html&#038;widget=true'></iframe></p>

2 个答案:

答案 0 :(得分:2)

要使用PHP提取HTML,您可以使用file_get_contents功能:

$html = file_get_contents('https://docs.google.com/spreadsheet/pub?key=0Ai0rAM-RzQC4dE1‌​hQ2FpdmFoU29POGFUR1NMQUl2RWc&#038;single=true&#038;gid=1&#038;output=html&#038;wi‌​dget=true');

答案 1 :(得分:1)

搜索引擎会关注IFrame中的网址,除非robots.txt或meta标签禁止这样做。

很难将HTML包含在现有页面中,因为至少必须删除<head>和部分<body>,并且可能修复了样式表。

相关问题