当前位置:网站首页>PHP WMI get hostname
PHP WMI get hostname
2022-06-24 17:30:00 【allway2】
<?php
$pc = "127.0.0.1"; //IP of the PC to manage
$WbemLocator = new COM("WbemScripting.SWbemLocator");
$WbemServices = $WbemLocator->ConnectServer($pc, 'root\\CIMV2', '', '');
$WbemServices->Security_->ImpersonationLevel = 3;
$disks = $WbemServices->ExecQuery("SELECT Name FROM Win32_ComputerSystem");
foreach ($disks as $d) {
print( $d->Name);
}边栏推荐
- QQ domain name detection API interface sharing (with internal access automatic jump PHP code)
- Solutions for RTSP video streaming played by several browsers
- zblog系统如何根据用户ID获取用户相关信息的教程
- Several cloud products of Tencent cloud have passed IPv6 enabled cloud logo certification
- Go language GC implementation principle and source code analysis
- "Competition" and "opportunity" hidden in security operation in the cloud Era
- Uncover the secrets of Tencent R & D! 30% of the demand will be responded within 1 day!
- How to use SEO to increase the inquiry volume?
- Why do you develop middleware when you are young? "You can choose your own way"
- Dunhuang Research Institute and Tencent have launched a new strategic cooperation to take you around the digital new silk road with AI
猜你喜欢

Mengyou Technology: tiktok current limiting? Teach you to create popular copywriting + popular background music selection

LC 300. Longest increasing subsequence

Why do you develop middleware when you are young? "You can choose your own way"
Using consistent hash algorithm in Presto to enhance the data cache locality of dynamic clusters

Etching process flow for PCB fabrication

MySQL learning -- table structure of SQL test questions
随机推荐
QQ domain name detection API interface sharing (with internal access automatic jump PHP code)
Industrial security experts talk about how to guarantee the safety of data elements in the rapid development of digital economy?
H265 video streaming web page without plug-in player easywasmlayer Troubleshooting and solution of JS unable to set cover photo
MySQL learning -- table structure of SQL test questions
Analysis of signal preemptive scheduling based on go language from source code
未来银行需要用明天的思维,来思考今天架构
How to convert XML to HL7
Tiktok Kwai, e-commerce enters the same river
Let ups "Impressionist users" re understand reliability
Cloud native monitoring practice (2) monitoring and collection of components outside the TKE cluster
Introduction to visual studio shortcut keys and advanced gameplay
Coding enhances security vulnerability scanning capability and helps the team "move left safely"
Erc-20 Standard Specification
Cloud native monitoring configuration self built alertmanager to realize alarm
Example description and case of ansible playbook automated cluster server management
Tencent released "warehouse express" and issued "ID card" for each commodity!
How much does the page length affect the ranking?
To redefine the storage architecture, Huawei has used more than five "cores"
[2021 taac & Ti-One] FAQs related to preliminary round computing resources
Following the previous SYSTEMd pit