TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   writing field data into the url? (http://www.talkphp.com/absolute-beginners/3378-writing-field-data-into-url.html)

sarmenhb 09-25-2008 12:36 AM

writing field data into the url?
 
hi, im trying to figure how i can put a forms field data into the url to have it process rather than putting the data into each field one by one.

for example

talkphps login page

its action is login.php?do=login

username field is called: vb_login_username
password field is called: vb_login_password
submit button has no name but by default it should be called query and its value is "Log in"

so instead of manually logging in

wouldnt i do something like this?

Code:

http://www.talkphp.com/login.php?do=login&vb_login_username=myusername&vb_login_password&query=Log in
i've tried this here and it didnt work. how is this possible??

thanks in advance

martins256 09-25-2008 07:25 AM

The <form> element have a method attribute, where you can put "get" or "post". When you submit a form with "get" there the variables will appear in url but with "post" attributes will be sent to server in header as attachment.

In serverside php is making two arrays one is $_POST and the other is $_GET. There is also $_REQUEST which is combined from $_POST, $_GET and $_COOKIE. If vbulletin gets login data from $_REQUEST your url should work, but if it uses $_POST you just can't do that.

Try FF addon `live HTTP headers` to see what data are you really sending to the server.

Salathe 09-25-2008 10:23 AM

The data that vBulletin sends along when logging in is (comments in parentheses):

vb_login_username = salathe
vb_login_password = (yes, empty!)
cookieuser = 1 (remember me)
s =
do = login
vb_login_md5password = 7d71fd91d770d166141b7bf730b425ca (your password MD5 hashed)
vb_login_md5password_utf = 7d71fd91d770d166141b7bf730b425ca


As far as I'm aware, vB looks at the POST data only for logging in (so an equivalent GET won't work).

ETbyrne 09-25-2008 10:44 PM

You should NEVER pass information like passwords over $_GET because it is insecure. All someone has to do is look at your browsing history to figure out your password. Use cURL to submit $_POST data.

sarmenhb 09-26-2008 03:01 AM

Quote:

Originally Posted by ETbyrne (Post 18481)
You should NEVER pass information like passwords over $_GET because it is insecure. All someone has to do is look at your browsing history to figure out your password. Use cURL to submit $_POST data.

lol, why is it that the older i get new knowledge just doesnt want to go into my brain such as curl.. even though its so easy to do.


All times are GMT. The time now is 02:39 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0