Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
stock_new
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
stock_new
Commits
c8781f83
Commit
c8781f83
authored
Jun 21, 2024
by
wuxiaoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复新浪获取实时信息
parent
a5d8bd78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
application/function.php
application/function.php
+4
-0
No files found.
application/function.php
View file @
c8781f83
...
...
@@ -447,12 +447,16 @@ if (!function_exists('getEndDay')) {
if
(
!
function_exists
(
'sina_market'
))
{
function
sina_market
(
$code
)
{
$headers
=
array
(
'referer: http://finance.sina.com.cn'
,
);
$d
=
fenxi
(
$code
);
$randm
=
time
()
.
mt_rand
(
100
,
999
);
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
'http://hq.sinajs.cn/rn='
.
$randm
.
'&list='
.
$d
.
','
.
$d
.
'_i'
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
0
);
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
$headers
);
$output
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
$pos
=
strpos
(
$output
,
'='
)
+
2
;
...
...
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