Python calls the zabbix api

Prerequisite preparation: 1. Use python requests module 2. Learn about json 3. The specific call of ZABBIX API is recommended to browse the official website first First code: import requests,json # #The url must be correct. Change the IP address to the one of your own zabbix server zbx_url = "http://192.168.60.130:3080/zabbix/api_jsonrpc.php" ...

Posted on Fri, 06 Dec 2019 05:22:43 -0800 by harvey

Common design patterns for PHP

Singleton mode Characteristic: Three Private One Public: Private static variables (store instances), Private construction methods (prevent creating instances), Private cloning methods (prevent cloning objects), Public static methods (provide instances to the outside world) Scenarios: In the application of programs, when database operations ...

Posted on Fri, 06 Dec 2019 03:50:08 -0800 by ycoleman

php disable function settings and view methods

This article mainly introduces the php disable function settings and viewing methods, and analyzes the php disable function methods and the relevant implementation skills of using php probes to view the disable function information by combining with the example form. You can refer to the following for your friends The example of this article de ...

Posted on Thu, 05 Dec 2019 15:31:58 -0800 by Izzy1979

phpcms v9 background article list add one button push to Baidu function

Push to Baidu can be pushed automatically or manually. The course of automatic push can be found online and searched by yourself. Here is manual push. Baidu push is divided into webmaster resource push and bear paw resource push. The api address is the same, and the parameters are slightly different. Here we put both in! (1) op ...

Posted on Thu, 05 Dec 2019 10:44:54 -0800 by ozzythaman

haproxy for dynamic and static separation and load balancing of discuz Forum

I. install httpd on cs2, cs3 and cs4 [root@cs2 ~]# yum install httpd [root@cs3 ~]# yum install httpd [root@cs4 ~]# yum install httpd 2. Install php and php MySQL on cs3 and cs4 [root@cs3 ~]# yum install php [root@cs3 ~]# yum install php-mysql [root@cs4 ~]# yum install php [root@cs4 ~]# yum install php-mysql 3. Install mysql on cs5 [root@cs ...

Posted on Thu, 05 Dec 2019 10:23:35 -0800 by gijs

Python crawler tutorial 8-100 hummingbird Web picture crawling 3

Wordy The capacity of the previous few days is quite large. Today I write a relatively simple one. It's hummingbird. I still use aiohttp. I hope you like it Crawling the page https://tu.fengniao.com/15/ this tutorial is still based on the purpose of learning. Why choose hummingbirds? There's no way. I chose them blindly. After a familiar ope ...

Posted on Wed, 04 Dec 2019 23:33:38 -0800 by dcole

Wechat applet search function! Attachment: applet front end + PHP back end

Development needs Wechat applets are very popular and easy to learn, but for beginners it's still a bit of a headache. Next, I'll share the idea of searching for applets. Technological process 1. Form (input box, submit button, submitted name value)2. Receive form data (js gets the value of form name=keyword)3. Send a request to the back end of ...

Posted on Wed, 04 Dec 2019 18:39:30 -0800 by nathanmaxsonadil

Implement a simple di container

I have seen many frameworks before, such as laravel, thinkphp, yii, etc. Basically, containers are used. For me, although I understand how laravel is written, if I don't try it, I still don't think it will be. The following code is a simple container I implemented. It's not very good in many places, but it should be enough. <?php class Cont ...

Posted on Wed, 04 Dec 2019 14:52:31 -0800 by RaheimSG

A review of PHP6 basic syntax (with Demo attached)

Reference materials (mooc.com) 1. PHP code needs to be written in "<?" and "? >"; <?php Expression ?> Just as writing a JavaScript scripting language needs to be written between < script > < script > tags, The PHP code written in the page is written between the < PHP? > tags, but ...

Posted on Wed, 04 Dec 2019 08:53:59 -0800 by rofl90

Get some information under a tag of SegmentFault

Preface At present, segment fault has not opened API. In 2017, Gaoyang dada said Planned Even though I didn't use SegmentFault In PHP, I randomly wrote a code to obtain the information under a certain tag, which has no technical content and is used for timing acquisition The purpose is to help solve problems if they can be solved, or to report ...

Posted on Wed, 04 Dec 2019 08:12:52 -0800 by jcanker