上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 198 下一页
摘要: package main import ( "github.com/antchfx/htmlquery" "io" "net/http" "os" "strconv" ) func main() { base_url := "https://tieba.baidu.com/f?kw=%E7%BB%9 阅读全文
posted @ 2020-08-24 23:20 brady-wang 阅读(265) 评论(0) 推荐(0)
摘要: https://github.com/antchfx/htmlquery package main import ( "fmt" "github.com/antchfx/htmlquery" "log" "net/http" "time" ) func main() { url := "http:/ 阅读全文
posted @ 2020-08-24 16:29 brady-wang 阅读(1631) 评论(0) 推荐(0)
摘要: 1 package main import ( "fmt" "io/ioutil" "net/http" ) func main() { resp,err := http.Get("http://yeves.cn") if err != nil{ fmt.Print("http get err",e 阅读全文
posted @ 2020-08-24 14:32 brady-wang 阅读(245) 评论(0) 推荐(0)
摘要: 建立一个交换机 tpc 并且绑定了各自的路由到 Q1 Q2 <?php require_once "./vendor/autoload.php"; use PhpAmqpLib\Connection\AMQPStreamConnection; use PhpAmqpLib\Message\AMQPM 阅读全文
posted @ 2020-08-21 21:29 brady-wang 阅读(372) 评论(0) 推荐(0)
摘要: <?php require_once "./vendor/autoload.php"; use PhpAmqpLib\Connection\AMQPStreamConnection; use PhpAmqpLib\Message\AMQPMessage; $conf = [ 'host' => '1 阅读全文
posted @ 2020-08-21 20:43 brady-wang 阅读(505) 评论(0) 推荐(0)
摘要: 代码 <?php require_once "./vendor/autoload.php"; use PhpAmqpLib\Connection\AMQPStreamConnection; use PhpAmqpLib\Message\AMQPMessage; $conf = [ 'host' => 阅读全文
posted @ 2020-08-21 20:31 brady-wang 阅读(321) 评论(0) 推荐(0)
摘要: <?php header('Content-Type:text/html;charset=utf8;'); $time = 10; $params = array( 'exchangeName' => 'test_cache_exchange'."_".$time, 'queueName' => ' 阅读全文
posted @ 2020-08-21 19:53 brady-wang 阅读(330) 评论(0) 推荐(0)
摘要: topic模式也称为主题模式,其实他相对于routing模式最大的好处就是他多了一种匹配模式的路由,怎么理解匹配呢,其实就相当于我们之前正则的.*这种,不过他的匹配机制可能不是这种(其实除了匹配规则外,他的作用就和routing模式一样 ),而他的工作流程图如下: OK! 先说一下他的匹配规则: 绑 阅读全文
posted @ 2020-08-21 18:04 brady-wang 阅读(527) 评论(0) 推荐(0)
摘要: 使用 php://input获取内容 <?php require "./vendor/autoload.php"; use GuzzleHttp\Client; $baseurl = "http://wang.com/json.php"; $client = new Client(); $respo 阅读全文
posted @ 2020-08-19 21:19 brady-wang 阅读(3671) 评论(0) 推荐(0)
摘要: php为了数组与url参数相互转换提供了两个函数: 1,数组转换为带&的URL的字符串 例如: $arr =['title'=>'我是小白','name'=>'真的很白','text'=>'但是决不放弃'];$res =urldecode(http_build_query($arr));var_du 阅读全文
posted @ 2020-08-19 21:15 brady-wang 阅读(461) 评论(0) 推荐(0)
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 198 下一页