curl -d "username=abc&passowrd=def" http://localhost/~noguxun/test1/post.php
At PHP side, it could be handled like
<?php if(isset($_POST['username'])) { echo $_POST['username']; } else { echo "no data"; } if(isset($_POST['password'])) { echo $_POST['password']; } else { echo "no data"; } ?>
No comments:
Post a Comment