提交 779f925f 编写于 作者: Z zhian song

SkywalkingContrib - php代码以及 php7+扩展

上级 41e12fc0
.deps
sky-php7ext\.idea
sky-php7ext\*.lo
sky-php7ext\*.la
sky-php7ext\.libs
sky-php7ext\acinclude.m4
sky-php7ext\aclocal.m4
sky-php7ext\autom4te.cache
sky-php7ext\build
sky-php7ext\config.guess
sky-php7ext\config.h
sky-php7ext\config.h.in
sky-php7ext\config.log
sky-php7ext\config.nice
sky-php7ext\config.status
sky-php7ext\config.sub
sky-php7ext\configure
sky-php7ext\configure.in
sky-php7ext\include
sky-php7ext\install-sh
sky-php7ext\libtool
sky-php7ext\ltmain.sh
sky-php7ext\Makefile
sky-php7ext\Makefile.fragments
sky-php7ext\Makefile.global
sky-php7ext\Makefile.objects
sky-php7ext\missing
sky-php7ext\mkinstalldirs
sky-php7ext\modules
sky-php7ext\run-tests.php
sky-php7ext\tests/*/*.diff
sky-php7ext\tests/*/*.out
sky-php7ext\tests/*/*.php
sky-php7ext\tests/*/*.exp
sky-php7ext\tests/*/*.log
sky-php7ext\tests/*/*.sh
.idea
\ No newline at end of file
# PHP SkyWalking Class: SkyWalking PHP client
---
- [Installation](#installation)
- [Requirements](#requirements)
- [Quick Start and Examples](#quick-start-and-examples)
---
### Installation
To install PHP SkyWalking Class, simply:
### Requirements
PHP Curl Class works with PHP 5.0,5.3, 5.4, 5.5, 5.6, 7.0, and HHVM.
### Quick Start and Examples
// must put these code at the beginning !!!
// that would auto register shutdown function !!!
include_once ("./SkyWalking.php");// or use composer
//LOG_PATH is skywalking's logfile path
SkyWalking::getInstance("mapi")->setLogPath(LOG_PATH)->setSamplingRate(5);
....
....
$ch = curl_init();
curl_setopt($ch);
....
....
SkyWalking::getInstance()->startSpanOfCurl("www.dangdang.com", $headers);
....
....
curl_setopt($ch);
$rs = curl_exec($ch);
SkyWalking::getInstance()->endSpanOfcurl($curl);
....
....
\ No newline at end of file
此差异已折叠。
<?php
/**
* 其他项目调用此项目会传递类似 HEADER 信息
* $_SERVER['HTTP_SWTRACECONTEXT'] = 'Segment1504173645811.59a7de4dc618f.14768.0.0.127.0.0.1|59a7de4dc61c5|api|baidu.com|Segment1504173645811.59a7de4dc61b0.14768.0.0.127.0.0.1|1';
*
*/
include_once ("./SkyWalking.php");
SkyWalking::getInstance("mapi");
/**
* 定义日志目录,目前传递数据使用log方式
* 设置log写入路径的方法:
*/
define('LOG_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'log');
SkyWalking::getInstance("api")->setLogPath(LOG_PATH)->setSamplingRate(5);
//发起B请求
sendA();
//发起B请求
sendB();
//发起B请求
sendC();
function sendA(){
/** start 应用本身的业务代码 **/
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
/** end 应用本身的业务代码 **/
SkyWalking::getInstance()->startSpanOfCurl("api.com", $headers);
//var_dump($headers);
/** start 应用本身的业务代码 **/
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://www.api.com/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl, CURLOPT_HEADER, 0);
$result = curl_exec($curl);
$errno = curl_errno($curl);
$error = curl_error($curl);
/** end 应用本身的业务代码 **/
SkyWalking::getInstance()->endSpanOfcurl($curl);
/** start 应用本身的业务代码 **/
curl_close($curl);
/** end 应用本身的业务代码 **/
}
function sendB(){
/** start 应用本身的业务代码 **/
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
/** end 应用本身的业务代码 **/
SkyWalking::getInstance()->startSpanOfCurl("api.com", $headers);
//var_dump($headers);
/** start 应用本身的业务代码 **/
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://www.api.com/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl, CURLOPT_HEADER, 0);
$result = curl_exec($curl);
$errno = curl_errno($curl);
$error = curl_error($curl);
/** end 应用本身的业务代码 **/
SkyWalking::getInstance()->endSpanOfcurl($curl);
/** start 应用本身的业务代码 **/
curl_close($curl);
/** end 应用本身的业务代码 **/
}
function sendC(){
/** start 应用本身的业务代码 **/
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
/** end 应用本身的业务代码 **/
SkyWalking::getInstance()->startSpanOfCurl("api.com", $headers);
//var_dump($headers);
/** start 应用本身的业务代码 **/
/** start 应用本身的业务代码 **/
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://www.api.com/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl, CURLOPT_HEADER, 0);
$result = curl_exec($curl);
$errno = curl_errno($curl);
$error = curl_error($curl);
/** end 应用本身的业务代码 **/
SkyWalking::getInstance()->endSpanOfcurl($curl);
/** start 应用本身的业务代码 **/
curl_close($curl);
/** end 应用本身的业务代码 **/
}
\ No newline at end of file
.deps
*.lo
*.la
.libs
acinclude.m4
aclocal.m4
autom4te.cache
build
config.guess
config.h
config.h.in
config.log
config.nice
config.status
config.sub
configure
configure.in
include
install-sh
libtool
ltmain.sh
Makefile
Makefile.fragments
Makefile.global
Makefile.objects
missing
mkinstalldirs
modules
run-tests.php
tests/*/*.diff
tests/*/*.out
tests/*/*.php
tests/*/*.exp
tests/*/*.log
tests/*/*.sh
skywalking
\ No newline at end of file
# PHP SkyWalking Class: SkyWalking PHP client
---
- [Installation](#installation)
- [Requirements](#requirements)
- [Quick Start and Examples](#quick-start-and-examples)
---
### Installation
To install PHP SkyWalking Class, simply:
### Requirements
PHP Curl Class works with PHP 5.0,5.3, 5.4, 5.5, 5.6, 7.0, and HHVM.
### Quick Start and Examples
// must put these code at the beginning !!!
// that would auto register shutdown function !!!
include_once ("./SkyWalking.php");// or use composer
//LOG_PATH is skywalking's logfile path
SkyWalking::getInstance("mapi")->setLogPath(LOG_PATH)->setSamplingRate(5);
....
....
$ch = curl_init();
curl_setopt($ch);
....
....
SkyWalking::getInstance()->startSpanOfCurl("www.dangdang.com", $headers);
....
....
curl_setopt($ch);
$rs = curl_exec($ch);
SkyWalking::getInstance()->endSpanOfcurl($curl);
....
....
\ No newline at end of file
dnl $Id$
dnl config.m4 for extension skywalking
dnl Comments in this file start with the string 'dnl'.
dnl Remove where necessary. This file will not work
dnl without editing.
dnl If your extension references something external, use with:
dnl PHP_ARG_WITH(skywalking, for skywalking support,
dnl Make sure that the comment is aligned:
dnl [ --with-skywalking Include skywalking support])
dnl Otherwise use enable:
dnl PHP_ARG_ENABLE(skywalking, whether to enable skywalking support,
dnl Make sure that the comment is aligned:
dnl [ --enable-skywalking Enable skywalking support])
PHP_ARG_ENABLE(skywalking, whether to enable skywalking support,
[ --enable-skywalking Enable skywalking support])
if test "$PHP_SKYWALKING" != "no"; then
dnl Write more examples of tests here...
dnl # --with-skywalking -> check with-path
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
dnl SEARCH_FOR="/include/skywalking.h" # you most likely want to change this
dnl if test -r $PHP_SKYWALKING/$SEARCH_FOR; then # path given as parameter
dnl SKYWALKING_DIR=$PHP_SKYWALKING
dnl else # search default path list
dnl AC_MSG_CHECKING([for skywalking files in default path])
dnl for i in $SEARCH_PATH ; do
dnl if test -r $i/$SEARCH_FOR; then
dnl SKYWALKING_DIR=$i
dnl AC_MSG_RESULT(found in $i)
dnl fi
dnl done
dnl fi
dnl
dnl if test -z "$SKYWALKING_DIR"; then
dnl AC_MSG_RESULT([not found])
dnl AC_MSG_ERROR([Please reinstall the skywalking distribution])
dnl fi
dnl # --with-skywalking -> add include path
dnl PHP_ADD_INCLUDE($SKYWALKING_DIR/include)
dnl # --with-skywalking -> check for lib and symbol presence
dnl LIBNAME=skywalking # you may want to change this
dnl LIBSYMBOL=skywalking # you most likely want to change this
dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
dnl [
dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SKYWALKING_DIR/$PHP_LIBDIR, SKYWALKING_SHARED_LIBADD)
dnl AC_DEFINE(HAVE_SKYWALKINGLIB,1,[ ])
dnl ],[
dnl AC_MSG_ERROR([wrong skywalking lib version or lib not found])
dnl ],[
dnl -L$SKYWALKING_DIR/$PHP_LIBDIR -lm
dnl ])
dnl
dnl PHP_SUBST(SKYWALKING_SHARED_LIBADD)
PHP_NEW_EXTENSION(skywalking, skywalking.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
fi
// $Id$
// vim:ft=javascript
// If your extension references something external, use ARG_WITH
// ARG_WITH("skywalking", "for skywalking support", "no");
// Otherwise, use ARG_ENABLE
// ARG_ENABLE("skywalking", "enable skywalking support", "no");
if (PHP_SKYWALKING != "no") {
EXTENSION("skywalking", "skywalking.c", PHP_EXTNAME_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
}
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
[skywalking]
skywalking.app_code = mapi
skywalking.sampling_rate = 99.22;
skywalking.log_path = /tmp/log
skywalking.header_client_ip_name = HTTP_DD_REAL_IP
skywalking.auto_open = On
\ No newline at end of file
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2017 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_SKYWALKING_H
#define PHP_SKYWALKING_H
extern zend_module_entry skywalking_module_entry;
#define phpext_skywalking_ptr &skywalking_module_entry
#define PHP_SKYWALKING_VERSION "0.1.0" /* Replace with version number for your extension */
#ifdef PHP_WIN32
# define PHP_SKYWALKING_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_SKYWALKING_API __attribute__ ((visibility("default")))
#else
# define PHP_SKYWALKING_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
#ifdef ZTS
#define SKY_G(v) TSRMG(skywalking_globals_id, zend_skywalking_globals *, v)
#else
#define SKY_G(v) (skywalking_globals.v)
#endif
#define SKYWALKING_TRACEID "ts" //TraceId
#define SKYWALKING_STARTTIME "st"//开始时间
#define SKYWALKING_ENDTIME "et" //结束时间
#define SKYWALKING_APP_CODE "ac"// App Code
#define SKYWALKING_FATHER_NODE_DATA "rs"//父节点数据
#define SKYWALKING_SPANS_NODE_DATA "ss"//span节点数据集合
#define SKYWALKING_DISTRIBUTED_TRACEIDS "gt" //DistributedTraceIds
#define SKYWALKING_SPAN_ID "si"//SpanId
#define SKYWALKING_PEERHOST "ph"//PeerHost
#define SKYWALKING_FATHER_SPAN_ID "ps"//父节点传过来的SpanId
#define SKYWALKING_SPAN_SERVER_URI "on" // Span 的服务URI
#define SKYWALKING_SPAN_STRING_PARAM "ts" //Span 的字符串型参数
#define SKYWALKING_SPAN_BOOL_PARAM "tb" //Span 的字符串型参数
#define SKYWALKING_SPAN_INT_PARAM "ti" //Span 的字符串型参数
#define SKYWALKING_SPAN_LOG "lo"//Span 的日志
int ski_zval_key = 0;
#define SKY_MAKE_NULL_ARRAY_NAME(i_zval_key) null_array_##i_zval_key
#define RAND_RANGE(__n, __min, __max, __tmax) \
(__n) = ((__min) + (zend_long) ((double) ( (double) (__max) - (__min) + 1.0) * ((__n) / ((__tmax) + 1.0))))
#define PHP_MT_RAND_MAX ((zend_long) (0x7FFFFFFF)) /* (1<<31) - 1 */
#ifdef PHP_WIN32
#define GENERATE_SEED() (((zend_long) (time(0) * GetCurrentProcessId())) ^ ((zend_long) (1000000.0 * php_combined_lcg())))
#else
#define GENERATE_SEED() (((zend_long) (time(0) * getpid())) ^ ((zend_long) (1000000.0 * php_combined_lcg())))
#endif
void *SKY_ADD_ASSOC_ZVAL(zval *z, const char *k) {
zval null_array;
array_init(&null_array);
add_assoc_zval(z, k, &null_array);
}
void *SKY_UPDATE_PROPERTY(zend_class_entry *cls, zval *tp, const char *name, size_t name_length) {
zval null_array;
array_init(&null_array);
zend_update_property(cls, tp, name, name_length, &null_array);
}
static char *sky_json_encode(zval *parameter);
static int _php_filter_validate_domain(char * domain, int len, zend_long flags) ;
static int _php_filter_validate_ipv4(char *str, size_t str_len, int *ip);
static int _php_filter_validate_ipv6(char *str, size_t str_len);
static int _php_filter_validate_url(char *value);
static zval *sky_instance(zval *this_ptr, const char *appCode);
static void date_register_classes(TSRMLS_D);
static void _init(const char *appCode, zval *this_ptr);
static char *build_SWheader_value(const char *peer_host, zval *this_ptr);
static zval *receive_SWHeader_from_caller(zval *this_ptr);
static char *get_millisecond();
static char *uniqid();
static char *make_trace_id();
static zend_always_inline zend_uchar is_sampling(zval *this_ptr);
static char *generate_trace_id(zval *this_ptr);
static char *get_ip();
static char *get_page_url_and_peer();
static long generate_span_id(zval *this_ptr);
static char *generate_distributed_trace_ids(zval *this_ptr);
static void *write_log(zval *this_ptr, char *text);
static zval *set_span_nodes_data(zval *this_ptr, zval *node_data);
static char *sky_finishAll();
static long sky_array_unshift(zval *stack, zval *var);
static void set_sampling_rate(zval *this_ptr, double degrees);
static void start_span_of_curl(char *peer_host, zval *headers, zval *this_pr);
static void set_span_param_of_curl(char *peer_host, zval *this_pr);
static void make_span_curl_header(char *peer_host, zval *headers, zval *this_pr);
static void start_span(zval *this_pr);
static int is_auto_open();
static void end_span_of_curl(zval *this_ptr,zval *curl);
void accel_sky_curl_init(INTERNAL_FUNCTION_PARAMETERS);
void accel_sky_curl_setopt(INTERNAL_FUNCTION_PARAMETERS);
void accel_sky_curl_exec(INTERNAL_FUNCTION_PARAMETERS);
/*
Declare any global variables you may need between the BEGIN
and END macros here:
*/
ZEND_BEGIN_MODULE_GLOBALS(skywalking)
char *global_log_path;
char *global_header_client_ip_name;
char *global_app_code;
zend_bool global_auto_open;
double global_sampling_rate;
ZEND_END_MODULE_GLOBALS(skywalking)
extern ZEND_DECLARE_MODULE_GLOBALS(skywalking);
/* Always refer to the globals in your function as SKYWALKING_G(variable).
You are encouraged to rename these macros something shorter, see
examples in any other php module directory.
*/
#define SKYWALKING_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(skywalking, v)
#if defined(ZTS) && defined(COMPILE_DL_SKYWALKING)
ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif /* PHP_SKYWALKING_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
此差异已折叠。
<?php
$br = (php_sapi_name() == "cli")? "":"<br>";
if(!extension_loaded('skywalking')) {
dl('skywalking.' . PHP_SHLIB_SUFFIX);
}
$module = 'skywalking';
$functions = get_extension_funcs($module);
echo "Functions available in the test extension:$br\n";
foreach($functions as $func) {
echo $func."$br\n";
}
echo "$br\n";
$function = 'confirm_' . $module . '_compiled';
if (extension_loaded($module)) {
$str = $function($module);
} else {
$str = "Module $module is not compiled into PHP";
}
echo "$str\n";
?>
<?php
echo ":::bengin:::\n";
ini_set("skywalking.log_path","/tmp/log2/");
$curl = curl_init("http://192.168.88.132/");
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
curl_setopt($curl, CURLOPT_URL, "http://192.168.88.132/");
//curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
$aa = curl_exec($curl);
//var_dump($aa);
$info = curl_getinfo($curl);
echo ":::end:::\n"
?>
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** skywalking extension is available ***\n";
$url = "{$host}/get.php?test=get";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$ok = curl_exec($ch);
curl_close($ch);
$curl_content = ob_get_contents();
ob_end_clean();
if($ok) {
var_dump( $curl_content );
} else {
echo "curl_exec returned false";
}
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** skywalking extension is available ***
string(25) "Hello World!
Hello World!"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ***' . "\n";
$url = "{$host}/get.php?test=get";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ***
string(25) "Hello World!
Hello World!"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl sending through GET an POST ***' . "\n";
$url = "{$host}/get.php?test=getpost&get_param=Hello%20World";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "Hello=World&Foo=Bar&Person=John%20Doe");
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl sending through GET an POST ***
string(208) "array(2) {
["test"]=>
string(7) "getpost"
["get_param"]=>
string(11) "Hello World"
}
array(3) {
["Hello"]=>
string(5) "World"
["Foo"]=>
string(3) "Bar"
["Person"]=>
string(8) "John Doe"
}
"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl setting referer ***' . "\n";
$url = "{$host}/get.php?test=referer";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://www.refer.er');
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl setting referer ***
string(19) "http://www.refer.er"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with user agent ***' . "\n";
$url = "{$host}/get.php?test=useragent";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'cURL phpt');
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl with user agent ***
string(9) "cURL phpt"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl_setopt($ch, CURLOPT_WRITEFUNCTION, <closure>); ***' . "\n";
$url = "{$host}/get.php?test=get";
$ch = curl_init();
$alldata = '';
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
curl_setopt($ch, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
$GLOBALS['alldata'] .= $data;
return strlen ($data);
});
curl_exec($ch);
curl_close($ch);
ob_end_flush();
echo "Data: $alldata";
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl_setopt($ch, CURLOPT_WRITEFUNCTION, <closure>); ***
Data: Hello World!
Hello World!===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$ch = curl_init();
curl_exec($ch);
var_dump(curl_error($ch));
var_dump(curl_errno($ch));
curl_close($ch);
?>
--EXPECTF--
Please use the command( tail -f *.log ) to view
%string|unicode%(%d) "No URL set!%w"
int(3)
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$url = "http://www.".uniqid().".".uniqid();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
var_dump(curl_error($ch));
var_dump(curl_errno($ch));
curl_close($ch);
?>
--EXPECTF--
Please use the command( tail -f *.log ) to view
%s resolve%s
int(6)
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$url = uniqid()."://www.".uniqid().".".uniqid();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
var_dump(curl_error($ch));
var_dump(curl_errno($ch));
curl_close($ch);
?>
--EXPECTF--
Please use the command( tail -f *.log ) to view
%unicode|string%(%d) "%Srotocol%s"
int(1)
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$url = "http://www.example.org";
$ch = curl_init();
curl_setopt($ch, CURLOPT_PROXY, uniqid().":".uniqid());
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
var_dump(curl_error($ch));
var_dump(curl_errno($ch));
curl_close($ch);
?>
--EXPECTF--
Please use the command( tail -f *.log ) to view
%unicode|string%(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:|Could not resolve host:|Could not resolve:)%r %s"
int(5)
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with cookie ***' . "\n";
$url = "{$host}/get.php?test=cookie";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIE, 'foo=bar');
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl with cookie ***
string(3) "bar"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with HTTP/1.0 ***' . "\n";
$url = "{$host}/get.php?test=httpversion";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl with HTTP/1.0 ***
string(8) "HTTP/1.0"
===DONE===
\ No newline at end of file
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with HTTP/1.1 ***' . "\n";
$url = "{$host}/get.php?test=httpversion";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl with HTTP/1.1 ***
string(8) "HTTP/1.1"
===DONE===
\ No newline at end of file
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$ch = curl_init();
var_dump($ch);
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
resource(%d) of type (curl)
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$url = 'http://www.example.com/';
$ch = curl_init($url);
var_dump($url == curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
bool(true)
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$ch = curl_init();
$info = curl_getinfo($ch);
var_dump($info);
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
array(2%d) {
[%u|b%"url"]=>
string(0) ""
["content_type"]=>
NULL
["http_code"]=>
int(0)
["header_size"]=>
int(0)
["request_size"]=>
int(0)
["filetime"]=>
int(0)
["ssl_verify_result"]=>
int(0)
["redirect_count"]=>
int(0)
["total_time"]=>
float(0)
["namelookup_time"]=>
float(0)
["connect_time"]=>
float(0)
["pretransfer_time"]=>
float(0)
["size_upload"]=>
float(0)
["size_download"]=>
float(0)
["speed_download"]=>
float(0)
["speed_upload"]=>
float(0)
["download_content_length"]=>
float(%f)
["upload_content_length"]=>
float(%f)
["starttransfer_time"]=>
float(0)
["redirect_time"]=>
float(0)
}
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** Testing curl_exec() : basic functionality ***\n";
$url = "{$host}/get.php?test=get";
$chs = array(
0 => curl_init(),
1 => curl_init(),
2 => curl_init(),
);
ob_start(); // start output buffering
curl_setopt($chs[0], CURLOPT_URL, $url); //set the url we want to use
curl_setopt($chs[1], CURLOPT_URL, $url); //set the url we want to use
curl_setopt($chs[2], CURLOPT_URL, $url); //set the url we want to use
$mh = curl_multi_init();
// add handlers
curl_multi_add_handle($mh, $chs[0]);
curl_multi_add_handle($mh, $chs[1]);
curl_multi_add_handle($mh, $chs[2]);
$running=null;
//execute the handles
$state = null;
do {
$state = curl_multi_exec($mh, $running);
} while ($running > 0);
//close the handles
curl_multi_remove_handle($mh, $chs[0]);
curl_multi_remove_handle($mh, $chs[1]);
curl_multi_remove_handle($mh, $chs[2]);
curl_multi_close($mh);
$curl_content = ob_get_contents();
ob_end_clean();
if($state === CURLM_OK) {
var_dump( $curl_content );
} else {
echo "curl_exec returned false";
}
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl_exec() : basic functionality ***
string(75) "Hello World!
Hello World!Hello World!
Hello World!Hello World!
Hello World!"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** Testing curl_exec() : basic functionality ***\n";
$url = "{$host}/get.php?test=get";
$chs = array(
0 => curl_init(),
1 => curl_init(),
2 => curl_init(),
);
ob_start(); // start output buffering
$options = array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url,
);
curl_setopt_array($chs[0], $options); //set the options
curl_setopt_array($chs[1], $options); //set the options
curl_setopt_array($chs[2], $options); //set the options
$mh = curl_multi_init();
// add handlers
curl_multi_add_handle($mh, $chs[0]);
curl_multi_add_handle($mh, $chs[1]);
curl_multi_add_handle($mh, $chs[2]);
$running=null;
//execute the handles
do {
curl_multi_exec($mh, $running);
} while ($running > 0);
$curl_content = '';
$curl_content .= curl_multi_getcontent($chs[0]);
$curl_content .= curl_multi_getcontent($chs[1]);
$curl_content .= curl_multi_getcontent($chs[2]);
//close the handles
curl_multi_remove_handle($mh, $chs[0]);
curl_multi_remove_handle($mh, $chs[1]);
curl_multi_remove_handle($mh, $chs[2]);
curl_multi_close($mh);
var_dump( $curl_content );
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
*** Testing curl_exec() : basic functionality ***
%unicode|string%(75) "Hello World!
Hello World!Hello World!
Hello World!Hello World!
Hello World!"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
$url = "http://{$host}/get.php?test=";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
var_dump($url == $info);
curl_close($ch);
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
Hello World!
Hello World!bool(true)
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php?test=";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
var_dump(curl_getinfo($ch, CURLINFO_HTTP_CODE));
curl_close($ch);
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
Hello World!
Hello World!int(200)
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php?test=contenttype";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
var_dump(curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
?>
===DONE===
--EXPECTF--
Please use the command( tail -f *.log ) to view
%unicode|string%(24) "text/plain;charset=utf-8"
===DONE===
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));
?>
--EXPECT--
Please use the command( tail -f *.log ) to view
array(2) {
[0]=>
string(38) ".php.net TRUE / FALSE 2145916799 C1 v1"
[1]=>
string(38) ".php.net TRUE / FALSE 2145916799 C2 v2"
}
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** skywalking extension is available ***\n";
$url = "{$host}/get.php?test=get";
$ch = curl_init();
curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));
$ok = curl_exec($ch);
var_dump($ok);
?>
--EXPECT--
Please use the command( tail -f *.log ) to view
*** skywalking extension is available ***
array(2) {
[0]=>
string(38) ".php.net TRUE / FALSE 2145916799 C1 v1"
[1]=>
string(38) ".php.net TRUE / FALSE 2145916799 C2 v2"
}
Hello World!
Hello World!bool(true)
\ No newline at end of file
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** skywalking extension is available ***\n";
$url = "{$host}/get.php?test=get&haveheader=1";
$ch = curl_init();
curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$ok = curl_exec($ch);
var_dump( $ok );
curl_close($ch);
?>
--EXPECT--
Please use the command( tail -f *.log ) to view
*** skywalking extension is available ***
Hello World!
Hello World!bool(true)
--TEST--
skywalking extension is available
--CREDITS--
--SKIPIF--
<?php if (!extension_loaded("skywalking")) print "skip"; ?>
--FILE--
<?php
$logPath = ini_get("skywalking.log_path");
$logFilename = strtolower($logPath . DIRECTORY_SEPARATOR . 'skywalking.' . date("Ymd") . '.log');
echo "Please use the command( tail -f *.log ) to view\n";
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** skywalking extension is available ***\n";
$url = "{$host}/get.php?test=get";
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
$ok = curl_exec($ch);
var_dump($ok);
?>
--EXPECT--
Please use the command( tail -f *.log ) to view
*** skywalking extension is available ***
Hello World!
Hello World!bool(true)
\ No newline at end of file
<?php
echo ":::bengin:::\n";
echo PHP_VERSION, "\n";
$curl = curl_init();
$headers = array(
"Content-type: text/xml",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Cache-Control: no-cache",
"Pragma: no-cache",
);
curl_setopt($curl, CURLOPT_URL, "http://192.168.88.165:88/c.php");
//curl_setopt($curl,CURLOPT_HTTPHEADER,$headers;
$aa = curl_exec($curl);
//var_dump($aa);
$info = curl_getinfo($curl);
echo ":::end:::\n"
?>
单独执行的web测试内容
c.phpt
d.phpt
以上生产 的 skywalking.20171027.log 其中包含测试版本信息内容
curl_001-0025为执行的phpt的测试
使用前请先执行 curl_001-0025 确保 服务可用
\ No newline at end of file
<?php
define ("PHP_CURL_SERVER_HOSTNAME", "localhost");
define ("PHP_CURL_SERVER_PORT", 8964);
define ("PHP_CURL_SERVER_ADDRESS", PHP_CURL_SERVER_HOSTNAME.":".PHP_CURL_SERVER_PORT);
function curl_cli_server_start() {
if(getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
return getenv('PHP_CURL_HTTP_REMOTE_SERVER');
}
$php_executable = getenv('TEST_PHP_EXECUTABLE');
$doc_root = __DIR__;
$router = "responder/get.php";
$descriptorspec = array(
0 => STDIN,
1 => STDOUT,
2 => STDERR,
);
if (substr(PHP_OS, 0, 3) == 'WIN') {
$cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
$cmd .= " {$router}";
$handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true));
} else {
$cmd = "exec {$php_executable} -t {$doc_root} -c /etc/php.ini -n -S " . PHP_CURL_SERVER_ADDRESS;
$cmd .= " {$router}";
$cmd .= " 2>/dev/null";
$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
// it might not be listening yet...need to wait until fsockopen() call returns
$error = "Unable to connect to server\n";
for ($i=0; $i < 60; $i++) {
usleep(50000); // 50ms per try
$status = proc_get_status($handle);
$fp = @fsockopen(PHP_CURL_SERVER_HOSTNAME, PHP_CURL_SERVER_PORT);
// Failure, the server is no longer running
if (!($status && $status['running'])) {
$error = "Server is not running\n";
break;
}
// Success, Connected to servers
if ($fp) {
$error = '';
break;
}
}
if ($fp) {
fclose($fp);
}
if ($error) {
echo $error;
proc_terminate($handle);
exit(1);
}
register_shutdown_function(
function($handle) use($router) {
proc_terminate($handle);
/* Wait for server to shutdown */
for ($i = 0; $i < 60; $i++) {
$status = proc_get_status($handle);
if (!($status && $status['running'])) {
break;
}
usleep(50000);
}
},
$handle
);
return PHP_CURL_SERVER_ADDRESS;
}
7.0.0
{"ts":"Segment.1509089793809.59f2e201c5bc7.12645.0.0.192.168.88.165","st":1509089794634,"et":1509089794638,"ss":[{"si":1,"ps":-1,"st":1509089794634,"et":1509089794638,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509089794635,"et":1509089794638,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509089793809.59f2e201c5be9.12645.0.0.192.168.88.165"]}
{"ts":"Segment.1509089793809.59f2e201c5bc7.12645.0.0.192.168.88.165","st":1509089793809,"et":1509089794639,"ss":[{"si":1,"ps":-1,"st":1509089793809,"et":1509089794639,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509089793831,"et":1509089794639,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509089793809.59f2e201c5be9.12645.0.0.192.168.88.165"]}
7.0.6
{"ts":"Segment.1509090001633.59f2e2d19a9ea.14420.0.0.192.168.88.165","st":1509090001947,"et":1509090001952,"ss":[{"si":1,"ps":-1,"st":1509090001947,"et":1509090001952,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090001947,"et":1509090001951,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090001633.59f2e2d19aa0c.14420.0.0.192.168.88.165"]}
{"ts":"Segment.1509090001633.59f2e2d19a9ea.14420.0.0.192.168.88.165","st":1509090001633,"et":1509090001953,"ss":[{"si":1,"ps":-1,"st":1509090001633,"et":1509090001953,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090001634,"et":1509090001953,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090001633.59f2e2d19aa0c.14420.0.0.192.168.88.165"]}
7.0.10
{"ts":"Segment.1509090001633.59f2e2d19a9ea.14420.0.0.192.168.88.165","st":1509090001947,"et":1509090001952,"ss":[{"si":1,"ps":-1,"st":1509090001947,"et":1509090001952,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090001947,"et":1509090001951,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090001633.59f2e2d19aa0c.14420.0.0.192.168.88.165"]}
{"ts":"Segment.1509090001633.59f2e2d19a9ea.14420.0.0.192.168.88.165","st":1509090001633,"et":1509090001953,"ss":[{"si":1,"ps":-1,"st":1509090001633,"et":1509090001953,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090001634,"et":1509090001953,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090001633.59f2e2d19aa0c.14420.0.0.192.168.88.165"]}
7.0.15
{"ts":"Segment.1509090278024.59f2e3e605ef4.18102.0.0.192.168.88.165","st":1509090278668,"et":1509090278673,"ss":[{"si":1,"ps":-1,"st":1509090278668,"et":1509090278673,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090278668,"et":1509090278673,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090278024.59f2e3e605f16.18102.0.0.192.168.88.165"]}
{"ts":"Segment.1509090278024.59f2e3e605ef4.18102.0.0.192.168.88.165","st":1509090278024,"et":1509090278674,"ss":[{"si":1,"ps":-1,"st":1509090278024,"et":1509090278674,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090278025,"et":1509090278674,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090278024.59f2e3e605f16.18102.0.0.192.168.88.165"]}
7.0.20
{"ts":"Segment.1509090278024.59f2e3e605ef4.18102.0.0.192.168.88.165","st":1509090278668,"et":1509090278673,"ss":[{"si":1,"ps":-1,"st":1509090278668,"et":1509090278673,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090278668,"et":1509090278673,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090278024.59f2e3e605f16.18102.0.0.192.168.88.165"]}
{"ts":"Segment.1509090278024.59f2e3e605ef4.18102.0.0.192.168.88.165","st":1509090278024,"et":1509090278674,"ss":[{"si":1,"ps":-1,"st":1509090278024,"et":1509090278674,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090278025,"et":1509090278674,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090278024.59f2e3e605f16.18102.0.0.192.168.88.165"]}
7.0.23
{"ts":"Segment.1509090436717.59f2e484af447.21673.0.0.192.168.88.165","st":1509090436966,"et":1509090436971,"ss":[{"si":1,"ps":-1,"st":1509090436966,"et":1509090436971,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090436966,"et":1509090436970,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090436717.59f2e484af469.21673.0.0.192.168.88.165"]}
{"ts":"Segment.1509090436717.59f2e484af447.21673.0.0.192.168.88.165","st":1509090436717,"et":1509090436972,"ss":[{"si":1,"ps":-1,"st":1509090436717,"et":1509090436972,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090436718,"et":1509090436972,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090436717.59f2e484af469.21673.0.0.192.168.88.165"]}
7.1.0
{"ts":"Segment.1509090688611.59f2e58095486.25196.0.0.192.168.88.165","st":1509090688647,"et":1509090688650,"ss":[{"si":1,"ps":-1,"st":1509090688647,"et":1509090688650,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090688647,"et":1509090688649,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090688611.59f2e580954ac.25196.0.0.192.168.88.165"]}
{"ts":"Segment.1509090688611.59f2e58095486.25196.0.0.192.168.88.165","st":1509090688611,"et":1509090688650,"ss":[{"si":1,"ps":-1,"st":1509090688611,"et":1509090688650,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090688634,"et":1509090688650,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090688611.59f2e580954ac.25196.0.0.192.168.88.165"]}
7.1.1
{"ts":"Segment.1509090834397.59f2e61260f3e.26953.0.0.192.168.88.165","st":1509090835146,"et":1509090835150,"ss":[{"si":1,"ps":-1,"st":1509090835146,"et":1509090835150,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090835147,"et":1509090835150,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090834397.59f2e61260f62.26953.0.0.192.168.88.165"]}
{"ts":"Segment.1509090834397.59f2e61260f3e.26953.0.0.192.168.88.165","st":1509090834397,"et":1509090835151,"ss":[{"si":1,"ps":-1,"st":1509090834397,"et":1509090835151,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509090834416,"et":1509090835151,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509090834397.59f2e61260f62.26953.0.0.192.168.88.165"]}
7.1.3
{"ts":"Segment.1509091012866.59f2e6c4d39fc.30461.0.0.192.168.88.165","st":1509091012890,"et":1509091012894,"ss":[{"si":1,"ps":-1,"st":1509091012890,"et":1509091012894,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091012891,"et":1509091012893,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091012866.59f2e6c4d3a08.30461.0.0.192.168.88.165"]}
{"ts":"Segment.1509091012866.59f2e6c4d39fc.30461.0.0.192.168.88.165","st":1509091012866,"et":1509091012895,"ss":[{"si":1,"ps":-1,"st":1509091012866,"et":1509091012895,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091012887,"et":1509091012895,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091012866.59f2e6c4d3a08.30461.0.0.192.168.88.165"]}
7.1.5
{"ts":"Segment.1509091111744.59f2e727b5bea.32218.0.0.192.168.88.165","st":1509091112296,"et":1509091112299,"ss":[{"si":1,"ps":-1,"st":1509091112296,"et":1509091112299,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091112296,"et":1509091112299,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091111744.59f2e727b5c02.32218.0.0.192.168.88.165"]}
{"ts":"Segment.1509091111744.59f2e727b5bea.32218.0.0.192.168.88.165","st":1509091111744,"et":1509091112300,"ss":[{"si":1,"ps":-1,"st":1509091111744,"et":1509091112300,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091111744,"et":1509091112300,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091111744.59f2e727b5c02.32218.0.0.192.168.88.165"]}
7.1.8
{"ts":"Segment.1509091264044.59f2e7c00ac7a.1651.0.0.192.168.88.165","st":1509091264675,"et":1509091264679,"ss":[{"si":1,"ps":-1,"st":1509091264675,"et":1509091264679,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091264675,"et":1509091264678,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091264044.59f2e7c00ac9f.1651.0.0.192.168.88.165"]}
{"ts":"Segment.1509091264044.59f2e7c00ac7a.1651.0.0.192.168.88.165","st":1509091264044,"et":1509091264680,"ss":[{"si":1,"ps":-1,"st":1509091264044,"et":1509091264680,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091264066,"et":1509091264680,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091264044.59f2e7c00ac9f.1651.0.0.192.168.88.165"]}
7.1.10
{"ts":"Segment.1509091416362.59f2e858588b1.3461.0.0.192.168.88.165","st":1509091417065,"et":1509091417068,"ss":[{"si":1,"ps":-1,"st":1509091417065,"et":1509091417068,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091417065,"et":1509091417068,"on":"http:\/\/192.168.88.132\/","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.132","url":"http:\/\/192.168.88.132\/"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091416362.59f2e858588bc.3461.0.0.192.168.88.165"]}
{"ts":"Segment.1509091416362.59f2e858588b1.3461.0.0.192.168.88.165","st":1509091416362,"et":1509091417069,"ss":[{"si":1,"ps":-1,"st":1509091416362,"et":1509091417069,"on":"http:\/\/192.168.88.165:88\/d.php","ts":{"span.layer":"http","component":"php-server","peer.host":"192.168.142.240","url":"http:\/\/192.168.88.165:88\/d.php","span.kind":"server"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]},{"si":2,"ps":1,"st":1509091416362,"et":1509091417069,"on":"http:\/\/192.168.88.165:88\/c.php","ts":{"span.layer":"http","component":"php-curl","span.kind":"client","peer.host":"192.168.88.165","url":"http:\/\/192.168.88.165:88\/c.php"},"tb":{},"ti":{"peer.port":80,"status_code":200},"lo":[]}],"ac":"mapi","gt":["Trace.1509091416362.59f2e858588bc.3461.0.0.192.168.88.165"]}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册