Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

爬取不到数据 #1

Open
ltgg opened this issue Jul 11, 2017 · 3 comments
Open

爬取不到数据 #1

ltgg opened this issue Jul 11, 2017 · 3 comments

Comments

@ltgg
Copy link

ltgg commented Jul 11, 2017

环境php56 swoole1.9.15
在go.php中配置了数据库和swoole信息
php go.php后等待10分钟后bt表中无数据
求解?

@cuijun123
Copy link
Owner

cuijun123 commented Jul 12, 2017

更新了 重新下载代码 并且打开inc\DhtClient.class.php 40行输出信息 看看有没有接受到请求
如下:

public static function request_action($msg, $address)
{
    switch ($msg['q']) {
        case 'ping'://确认你是否在线
            echo '朋友'.$address[0].'正在确认你是否在线'.PHP_EOL;
            self::on_ping($msg, $address);
            break;
        case 'find_node': //向服务器发出寻找节点的请求
            echo '朋友'.$address[0].'向你发出寻找节点的请求'.PHP_EOL;
            self::on_find_node($msg, $address);
            break;
        case 'get_peers':
            echo '朋友'.$address[0].'向你发出查找资源的请求'.PHP_EOL;
            // 处理get_peers请求
            self::on_get_peers($msg, $address);
            break;
        case 'announce_peer':
            echo '朋友' . $address[0] . '找到资源了 通知你一声' . PHP_EOL;
            // 处理announce_peer请求
            self::on_announce_peer($msg, $address);
            break;
        default:
            break;
    }
}

@heyli
Copy link

heyli commented Jan 4, 2018

echo '朋友' . $address[0] . '找到资源了 通知你一声' . PHP_EOL;
这句一直没有输出,这是表示没有找到资源?

@sdpong
Copy link

sdpong commented Jan 18, 2018

同样,放在阿里云上,策略全关,一直找不到资源

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants