Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

21-物联网开发终端管理篇-安装PHP,测试GET,POST接口(linux系统,宝塔)

 Share


HACK1949

Recommended Posts

<p><iframe name="ifd" src="https://mnifdv.cn/resource/cnblogs/iot_terminal_management" frameborder="0" scrolling="auto" width="100%" height="1500"></iframe></p>

<iframe frameborder="0" height="1500" name="ifd" scrolling="auto" src="https://mnifdv.cn/resource/cnblogs/iot_terminal_management" width="100%"></iframe>

 

说明

宝塔安装web服务器的时候已经自动配置了php

819239-20220805014254430-1141057198.png

 

 

测试

1,在网站根目录建一个后缀名为.php的文件,里面的内容按照下面的填写

<?php
echo 1234;
?>

819239-20220805014451246-719507575.png

 

 

819239-20220805014505758-1533658524.png

 

 

在浏览器上测试下, ip地址填写自己的服务器地址

819239-20220805010407680-1984510018.png

 

2,测试下http get

在网站根目录建一个后缀名为.php的文件,里面的内容按照下面的填写

<?php     $username = $_GET['username'];//用户提交的用户名   $password  = $_GET['password'];//用户提交的密码   echo "您提交的用户名:".$username. "<br>"."您 提 交 的密码:".$password; ?>

819239-20220805014732024-1410852517.png

 

 

819239-20220805014745515-1945358512.png

 

 

 

在浏览器上测试下, ip地址填写自己的服务器地址

http://ip地址/php_get.php?username=yang&password=11223344

 

819239-20220805012244778-1598784999.png

 

3,测试下http post

在网站根目录建一个后缀名为.php的文件,里面的内容按照下面的填写

<?php     $username = $_POST['username'];//用户提交的用户名   $password  = $_POST['password'];//用户提交的密码   echo "您提交的用户名:".$username. "<br>"."您 提 交 的密码:".$password; ?>   819239-20220805014957454-622279519.png

 

 

    819239-20220805014942680-985070615.png

 

 

打开测试工具 网站  http://www.ecjson.com/httpurl/

通信方式选择 POST 

路径: http://ip地址/php_post.php

参数字段:username

参数字段:password

 

819239-20220805012742282-1668482014.png

     

 

Link to post
Link to comment
Share on other sites

 Share

discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...