Ec (2); http_referer, the simplest picture piracy is to use this super global variable in the php tutorial for an instance, but this function can be easily cracked, the reason is that we can write a class to send related information from the browser. The Code is as follows. Functiongetremotefile ($ url, $ refer) {$ optionarray (http & gt; array (header & gt; script ec (2); script
Http_referer, the simplest image piracy is to use this super global variable in the php tutorial for an instance, but this function can be easily cracked, the reason is that we can write a class to send related information from the browser. The Code is as follows.
Function getremotefile ($ url, $ refer = ''){
$ Option = array (
'Http' => array (
'Header' => "referer: $ refer ")
);
$ Context = stream_context_create ($ option );
Return file_get_contents ($ url, false, $ context );
}
Stream_context_create creates and returns a text data stream and applies various options. It can be used in special procedures such as timeout settings, proxy server, request method, and header information settings for fopen (), file_get_contents () and other processes.
Function prototype: resource stream_context_create ([array $ options [, array $ params])
For more details, see: http://www.111cn.net/phper/php-function/36535.htm