Tag: curl
-
Post Views: 14 1. When the data length of PA_LOG is: 6.16 GB, as shown in Figure 1 2. Get the first page of the log list, the response time is about 1000ms, which is acceptable, as shown in Figure 2 3. Get the last page of the log list, the response timeout: 504 gateway time-out, as shown in Figure…
-
Post Views: 13 1. Check the Go file: exercise-maps.go, the code is as follows 2. Run the file, Go reports an error: exercise-maps.go:4:2: Cannot find package “code.google.com/p/go-tour/wc” in any of: C:\Go\src\code.google.com\p\go-tour\wc (from $goroot) C:\Users\Administrator\Go\src\code.google.com\p\go-tour\wc (from $gopath), as shown in Figure 1 3. Open the URL of Go Tour on GitHub:https://github.com/golang/tour, after turning on the blue light connection, install the go…
-
Post Views: 94 1. Execute the command in Windows PowerShell: curl -x POST –data, report an error: invoke-webrequest : The location formal parameter that accepts the actual parameter “post” cannot be found. as shown in Figure 1 2. Invoke-WebRequest is a command-line tool similar to curl on the Windows platform. Execute the command: get-help invoke-webrequest, as shown in Figure 2…
-
Post Views: 15 The code is as follows: //$data1 = file_get_contents(http://bbs.chengdu.cn/i_index_newdata.php?fids=202,238,239,240,241,242,259,271); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,http://bbs.chengdu.cn/i_index_newdata.php?fids=202,238,239,240,241,242,259,271); curl_setopt($ch, CURLOPT_RETURNTTransfer, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 50); $data1 = curl_exec($ch); curl_close($ch); Since the content of the remote file is read, I finally decided to use curl to replace the file_get_contents, and the feeling speed and stability have…