Re: Autologin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/12/2015 12:48, Renata Dias wrote:
> Hello,
> 
> I need to create a PHP code that "POST" (method) the username/password to
> access some URLs.
> The URLs are a device that is accessible by http://IP or https://IP, I dont
> have access to write URL's code.
> 
> When I "POST" the credentials with a php form, the URL accept
> authentication then redirect browser to index. But, the credentials are
> displayed in "view source code".
> 
> So, I tryed to "POST" with php curl. The authentication works fine, and
> result return the index page of device.
> But, I got stuck in my php curl. I need go to http://IP/index.php, already
> authenticated, like the php form do.
> 
> Can anyone help me?
> 
> Thanks.
> 
Hi,

When you have POSTed the login details, does the server return a cookie
in the headers?

I suspect the site requires that cookie (or cookies) to be sent back
with every request to show that you are authenticated (and to maintain
the session).

What you are basically doing is emulating a web browser in php, so you
need to do everything that a web browser would do.

Regards

Ian
-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux