Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
50b0d073
Commit
50b0d073
authored
Jun 28, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Client CURL 调整
parent
d60d1626
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Client.php
src/base/Client.php
+3
-3
No files found.
src/base/Client.php
View file @
50b0d073
...
@@ -123,11 +123,10 @@ abstract class Client
...
@@ -123,11 +123,10 @@ abstract class Client
$ci
=
curl_init
();
$ci
=
curl_init
();
/* Curl settings */
/* Curl settings */
curl_setopt
(
$ci
,
CURLOPT_USERAGENT
,
'PHP/'
.
PHP_VERSION
.
' Client/'
.
$this
->
clientId
);
curl_setopt
(
$ci
,
CURLOPT_USERAGENT
,
'PHP/'
.
PHP_VERSION
.
' Client/'
.
$this
->
clientId
);
curl_setopt
(
$ci
,
CURLOPT_CONNECTTIMEOUT
,
8
);
curl_setopt
(
$ci
,
CURLOPT_CONNECTTIMEOUT
,
5
);
curl_setopt
(
$ci
,
CURLOPT_TIMEOUT
,
8
);
curl_setopt
(
$ci
,
CURLOPT_TIMEOUT
,
8
);
curl_setopt
(
$ci
,
CURLOPT_RETURNTRANSFER
,
TRUE
);
curl_setopt
(
$ci
,
CURLOPT_RETURNTRANSFER
,
TRUE
);
curl_setopt
(
$ci
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$ci
,
CURLOPT_SSL_VERIFYPEER
,
false
);
//curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
curl_setopt
(
$ci
,
CURLOPT_HEADER
,
FALSE
);
curl_setopt
(
$ci
,
CURLOPT_HEADER
,
FALSE
);
if
(
$post
)
{
if
(
$post
)
{
...
@@ -138,7 +137,8 @@ abstract class Client
...
@@ -138,7 +137,8 @@ abstract class Client
curl_setopt
(
$ci
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ci
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ci
,
CURLOPT_HTTPHEADER
,
$headers
);
curl_setopt
(
$ci
,
CURLOPT_HTTPHEADER
,
$headers
);
curl_setopt
(
$ci
,
CURLINFO_HEADER_OUT
,
TRUE
);
//curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE);
//curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
$response
=
curl_exec
(
$ci
);
$response
=
curl_exec
(
$ci
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment