Home  >  Article  >  Backend Development  >  Follow me and learn the thief program to successfully steal the home page (Day 3)_PHP Tutorial

Follow me and learn the thief program to successfully steal the home page (Day 3)_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 16:09:29971browse


Today we teach how to steal the homepage. Different homepages require different stealing methods, mainly analyzing the HTML code. The functions and methods were introduced very clearly in the previous two days. Today we will explain and use them in practice.

Let’s start with Huajun Software Park.
Open the homepage of Huajun Software Park
http://www.onlinedown.net/index.htm
Use Dreamweaver to create a new page of index.php.
Note:
First make the homepage template you want, and then start to steal the homepage. Taking into account the tutorial for beginners, so first put the template and PHP processing code on the same webpage.
I will teach you HTML and PHP later. separation.

After the template is created, we start stealing.
Insert PHP code above
, as follows:
require ' ./commom.php';
update("index.htm");
$file=readfromfile("cache/index.htm");

?>
Explanation
require './commom.php'//Introduce the commom.php file
update("index.htm")//Read and write the index.htm web page
$file=readfromfile("cache/index .htm")//Read index.htm from the local folder cache
The $file here is a variable, you can name it whatever you want. You can also call it $html
but it needs to be used later. Unification.

The above code does not process anything, nor does it output anything. If $file is output, then it is all the html code of index.htm.
Let’s start with index.htm Get what we want.

1 Get the code for foreign software update.
You can name a variable $gwrj //You can choose the name of the foreign software as you like
How to get it from this index. How about htm taking out this foreign software we want? Here we take out the cut function we talked about in the previous section
$gwrj = cut($file,"");
Explanation
$xxx = cut($file,"$first","$end");
How does it work? Just cut $file (index.htm) Cut the lower part from $first, and take the upper part from $end.
For example:
$file = "111222333444";
$xxx = cut($file," 1","3");//The result is 11222. This explanation should be clear, right?
Note:
""
在" "If there is content within", you need to add
example
""
to become
""
The following code successfully steals foreign software:
require './commom.php';
update(" index.htm");
$file=readfromfile("cache/index.htm");
$gwrj = cut($file," ","");
?>
Then in your html template, insert the code where it needs to be displayed


The same goes for other thefts.
Note:
The HTML taken here needs to be replaced with its own code. It can be replaced altogether or one by one.
We talk about changing the code individually. :
$gwrj = cut($file,"","");
$gwrj = str_replace("soft/ ","soft.php?id=",$gwrj);
$gwrj = str_replace(".htm","",$gwrj);
Explanation:
It is a stolen foreign software Code replacement in.
The original

has become the current


Basically, it should be very detailed for a newbie. First make the homepage template, and then dig out what you want one by one.
Think A question.
In index.htm, there is a lot of classified information, which is displayed by calling JS. How do you take it and display it on your homepage?
I hope everyone can steal it smoothly.
Let’s briefly talk about stealing categories. It’s the same as stealing the homepage. The code is as follows:
require './commom.php';

if($soft){
                                                                                                                            update("${soft}.htm","soft"); >soft.php
Where $soft is soft.php?id=1234 passed from before ;
That’s it for today, I’ll teach you templates tomorrow.




http://www.bkjia.com/PHPjc/314495.html

www.bkjia.com

true

TechArticleToday we teach how to steal the homepage. Different homepages require different stealing methods, mainly analyzing HTML code. Functions And the method was introduced very clearly two days ago. Today we explain and use it in practice...