func's recent timeline updates
func

func

V2EX member #127651, joined on 2015-07-17 15:08:18 +08:00
func's recent replies
Mar 11, 2024
Replied to a topic by gmuubyssss 问与答 写了个量化 bot。
谢谢,application#aliyun.com
Oct 7, 2022
Replied to a topic by imSam PHP 求教个 PHP 的 substr 问题 ....
```php
<?php

function fetch() {
$url = 'https://steamcommunity.com/app/200210';

$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 3,
CURLOPT_URL => $url,
CURLOPT_HEADER => [
'User-Agent' =>'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36',
],
]);

return curl_exec($ch);
}

function parseHTML( $html) {
if (!$html) {
return '';
}

libxml_use_internal_errors(true);

$dom = new DOMDocument('1.0');
$dom->preserveWhiteSpace = true;
$dom->loadHTML($html);
$xpath =new DOMXPath($dom);

$node = $xpath->query('//span[@class="apphub_NumInApp"]');
$text = $node->item(0)->textContent;

// 有可能是中文,以空格分隔
list($onlineCount, $left) = sscanf($text, '%s %s');

return str_replace( ',', '', $onlineCount);
}

$result = parseHTML(fetch());

var_dump($result);

```
她没接触过社会吗?
plus one 1
是时候找下家了
点微信群的一个西瓜拼团链接, 花了一块钱, 2 个人拼团成功. 然而, 却说没有货了...订阅了到货提醒, 每天提醒我有货了, 马上点进去准备购买, 却说没货了...明明领了券, 却不能消费 就这样等了一个星期券过期了, 我的一块钱就这么没了.. 问客服说, 这是没有办法的事. 叫客服退钱,也不肯退.
分母.
Aug 17, 2016
Replied to a topic by caserest 推广 不知道为什么就想送点东西给大家!
1: 钱太少
2: 我不会 Java
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2926 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 12:42 · PVG 20:42 · LAX 05:42 · JFK 08:42
♥ Do have faith in what you're doing.