[PHP] Benovel_class →→→→→进入此内容的聊天室

来自 , 2020-11-21, 写在 PHP, 查看 120 次.
URL http://www.code666.cn/view/f076073b
  1. <?php
  2. /*
  3.  
  4.  
  5.  
  6. */
  7. class be{
  8.         var $net=new Cnet;
  9.         var $novel=new Cnovel;
  10.         var $file=new Cfile;
  11. }
  12. class Cnet{
  13.         var $ch;
  14.         var $cookies;// =>no save
  15.         var $header;
  16.         function __construct(){
  17.                 $ch=curl_init();
  18.                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  19.         }
  20.         function set_header($header){
  21.                 curl_setopt($ch,CURLOPT_HEADER,$header);
  22.         }
  23.         function set_cookies($cookie_file){
  24.                 curl_setopt($ch,CURLOPT_COOKIEFILE,$cookie_file);
  25.         }
  26.         function send($url){
  27.                 $response=curl_exec($ch);
  28.                 return $response;
  29.         }
  30.         function __destruct(){
  31.                 curl_close($ch);
  32.         }
  33. }
  34. Class Cfile{
  35.         function read($address){
  36.                 file_get_contents($address);
  37.         }
  38.         function write($address,$txt){
  39.                 $file = fopen($address,"w");
  40.                 return fwrite($file,$txt);
  41.                 fclose($file);
  42.         }
  43. }
  44. Class Cdb{
  45.         var $file;
  46.         function __construct(){
  47.         $file=new Cfile;
  48.         }
  49.         function read($c,$where)}
  50.                 $file->read(Be_Root.Be_Data."/".,)
  51.         }
  52. }

回复 "Benovel_class"

这儿你可以回复上面这条便签

captcha