当前位置:网站首页>PHP implementation of iframe cross site text replacement / iframe website text replacement

PHP implementation of iframe cross site text replacement / iframe website text replacement

2022-06-10 23:27:00 Yu Fei SEO

brief introduction

A page can be Put the frame tag on your own page , But some of the links , Or words don't want , You can replace them .

The sample code  

<?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(" Original station words "," Neologism ",$content);
$content=str_replace(" Original station words "," Neologism ",$content);
$content=str_replace(" Original station words "," Neologism ",$content);
// Replace the original word with a new one , Here you can continue to add more keywords to modify , But it can't be resolved https Website , And pay attention to whether the character code of this document is consistent with that of the target station .
echo $content;
exit;
?>

The above code is copied to PHP In file , If the file is named iframe.php

Then the method of use is :( Change the address and file name at will )

domain name /iframe.php?yfi6.com

Be careful :https The destination station cannot be used , The other party must be http The web page of .

Part of this article comes from the Internet , Please quote source for reprint , If you need a complaint, please contact us [email protected]

原网站

版权声明
本文为[Yu Fei SEO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206102217200872.html