当前位置:网站首页>PHP实现iframe跨站替换文字/替换iframe网站文字的方法
PHP实现iframe跨站替换文字/替换iframe网站文字的方法
2022-06-10 22:17:00 【于飞SEO】
简介
可将某个页面 用框架标签放到自己页面中,但其中有些链接,或者文字不想要,即可替换掉他们。

实例代码
<?php
$site=$_SERVER['QUERY_STRING'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $site);
$content = curl_exec ($ch);
curl_close ($ch);
$content=str_replace("原站词","新词",$content);
$content=str_replace("原站词","新词",$content);
$content=str_replace("原站词","新词",$content);
//原词替换成新词,这里可以继续添加使关键词修改的更多,但无法解析https网站,并且注意本文件的字符编码与目标站的编码是否一致。
echo $content;
exit;
?>上面代码复制到PHP文件中,文件如果命名为iframe.php
那么使用方法即:(地址和文件名自己随意改)
域名/iframe.php?yfi6.com
注意:https目标站无法使用,对方必须是http的网页。
本文部分内容来源于网络,转载请注明来源,如需投诉请联系我们[email protected]
边栏推荐
猜你喜欢

乘风破浪,探索数据可视化开发平台 FlyFish 开源背后的秘密!

掌握高性能计算前,我们先了解一下它的历史

【Flutter 问题系列第 6 篇】如何在 Flutter 中实现列表消息的滚动效果

Dell R730 raid5 安装Server 2016(解决磁盘大于2T)

执行Oracle的SQL语句报错【ORA-00904: “CREATETIME“: 标识符无效】、【ORA-00913: 值过多】解决办法

项目实训13——界面补充

Development and implementation of AI intelligent video analysis easycvr platform device channel batch deletion function

一文带你了解J.U.C的FutureTask、Fork/Join框架和BlockingQueue

Lenovo explained for the first time the five advantages of hybrid cloud Lenovo xcloud and how to build an intelligent digital base

PwnTheBox,Web:hello
随机推荐
laravel8 实现阿里云文件上传
简单阻抗匹配电路及公式
项目实训13——界面补充
我们对产业互联网的认识,还是困囿于互联网式的平台和中心的逻辑之中
Data and information resource sharing platform (IV)
ICML2022 | 从零开始重新审视端到端的语音到文本翻译
PwnTheBox,Pwn:tutorial1
LeetCode+ 16 - 20
Ride the storm and explore the secret behind the open source of flyfish, a data visualization development platform!
Project training 13 - Interface supplement
Design language testing for functional testing: what tests are included in functional testing? What is the role of each
Our understanding of the industrial Internet is still trapped in the logic of an Internet like platform and center
Auto. JS Pro development environment configuration
Vscode common shortcuts
C语言创建动态二维数组
Vscode common plug-ins and configurations
Thread pool: a magic weapon for managing threads
200 c language words, please collect!
在Oracle表中如何进行关键词搜索
MySQL组合索引不被命中使用的情况