Download the PHP package sunbirder/socketlog without Composer

On this page you can find all versions of the php package sunbirder/socketlog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package socketlog

说明

SocketLog适合Ajax调试和API调试, 举一个常见的场景,用SocketLog来做微信调试, 我们在做微信API开发的时候,如果API有bug,微信只提示“改公众账号暂时无法提供服务,请稍候再试” ,我们根本不知道API出来什么问题。 有了SocketLog就不一样了, 我们可以知道微信给API传递了哪些参数, 程序有错误我们也能看见错误信息(下方有张图片,可能加载慢,请耐心等待一下)

微信调试

使用方法

配置

支持composer

支持ThinkPHP

ThinkPHP5后, 在框架层集成了SocketLog ,只需要设置配置即可用

对数据库进行调试

通过上面的方法,socketlog还能自动为你检测没有where语句的sql操作,然后自动提示你。

对API进行调试

网站调用了API ,如何将API程序的调试信息也打印到浏览器的console中? 前面我们讲了一个配置 force_client_id, 能将日志强制记录到指定的浏览器。 用这种方式也可以将API的调试信息打印到console中,但是force_client_id 只能指定一个client_id, 如果我们的开发环境是多人共用,这种方式就不方便了。 其实只要将浏览器传递给网站的User-Agent 再传递给API, API程序中不用配置force_client_id, 也能识别当前访问程序的浏览器, 将日志打印到当前访问程序的浏览器, 我们需要将SDK代码稍微做一下修改。 调用API的SDK,一般是用curl写的,增加下面代码可以将浏览器的User-Agent传递到API 。

    $headers=array();
    if(isset($_SERVER['HTTP_USER_AGENT']))
    {
        $headers[]='User-Agent: '.$_SERVER['HTTP_USER_AGENT'];
    }
    if(isset($_SERVER['HTTP_SOCKETLOG']))
    {
        $headers[]='Socketlog: '.$_SERVER['HTTP_SOCKETLOG'];
    }
    curl_setopt($ch,CURLOPT_HTTPHEADER,$headers); 

区分正式和开发环境

进入chrome浏览器的“工具”-->“扩展程序” , 点击SocketLog的“选项”进行设置。

分析开源程序

有了SocketLog,我们能很方便的分析开源程序,下面以OneThink为例, 大家可以在 http://www.topthink.com/topic/2228.html 下载最新的OneThink程序。 安装好OneThink后,按下面步骤增加SocketLog程序。

通过console的日志,访问每一页我们都知道程序干了什么,是一件很爽的事情。

视频教程

http://edu.yuantuan.com/course/198

感谢猿团的张盛翔(诺墨)提供教程。

About Me


All versions of socketlog with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sunbirder/socketlog contains the following files

Loading the files please wait ....