2012/06/04

About HTTP Post

Make a Http Post by CURL

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

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...