How to deduce login PHP parameters for Programmatic POST -
i'm using c# log on website. have helpful code sample c# bit, requires pass php script login parameters in format similar "username=myusername&password=mypassword". don't know php nor have access script. there way deduce markup parameters script expecting?
here's basis of c# code: login website, via c#
thanks in advance.
<form id="login" method="post" action="http://mysite.com/forums/index.php?app=core&module=global&section=login&do=process"> <input type="hidden" value="990ea6a14ea49e853634fbdc5015a024" name="auth_key"> <input type="hidden" value="http://www.mysite.com/" name="referer"> <div id="regular_signin"> <a id="_regularsignin"></a> <h3 class="bar">enter sign in name , password</h3> <ul> <li class="field"> <label for="username">username or email address:</label> <input type="text" size="25" name="username" class="input_text" id="username"> </li> <li class="field"> <label for="password">password:</label> <input type="password" size="25" name="password" class="input_text" id="password"><br> <a title="retrieve password" class="desc" href="http://mysite.com/forums/index.php?app=core&module=global&section=lostpass">i've forgotten password</a> </li> </ul> </div><hr> <fieldset id="signin_options"> <legend>sign in options</legend> <ul> <li class="field checkbox"> <input type="checkbox" class="input_check" value="1" name="rememberme" checked="checked" id="remember"> <label for="remember"> remember me<br> <span class="desc">this not recommended shared computers</span> </label> </li> <li class="field checkbox"> <input type="checkbox" class="input_check" value="1" name="anonymous" id="invisible"> <label for="invisible"> sign in anonymously<br> <span class="desc">don't add me active users list</span> </label> </li> </ul> </fieldset> <fieldset class="submit"> <input type="submit" value="sign in" class="input_submit"> or <a class="cancel" title="cancel" href="http://mysite.com/forums">cancel</a> </fieldset> </form>
when form submitted, end point (action) receive each of inputs name in $_post array. in case, php script expecting $_post['username'] , $_post['password']. contents of hidden inputs , appear in $_post super global.
Comments
Post a Comment