From bbc0415dd0a52a52c65af2fab0eaa8d8b79eee41 Mon Sep 17 00:00:00 2001 From: hakasenyang Date: Sat, 10 Dec 2016 16:51:20 +0900 Subject: [PATCH] Add files --- include.php | 6 ++++++ include/db.php | 22 ++++++++++++++++++++++ _function.php => include/webparser.php | 14 +++++++------- 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 include.php create mode 100644 include/db.php rename _function.php => include/webparser.php (78%) diff --git a/include.php b/include.php new file mode 100644 index 0000000..d2350bf --- /dev/null +++ b/include.php @@ -0,0 +1,6 @@ +mysql = new mysqli($ip, $dbid, $dbpw, $dbnm); + } + public function Query($query) + { + // ... + } + public function Insert($query) + { + // ... + } + } \ No newline at end of file diff --git a/_function.php b/include/webparser.php similarity index 78% rename from _function.php rename to include/webparser.php index fe74acb..927e2ad 100644 --- a/_function.php +++ b/include/webparser.php @@ -1,5 +1,7 @@ true, + $opts = array( + CURLOPT_RETURNTRANSFER => true, CURLOPT_URL => $url, CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => 5, CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_HEADER => $headershow, CURLOPT_USERAGENT => $this->httph - ); + ); curl_setopt_array($ch, $opts); if ($otherheader) curl_setopt($ch, CURLOPT_HTTPHEADER, $otherheader); if ($cookie) curl_setopt($ch, CURLOPT_COOKIE, $cookie);