FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to cURL a JSP page
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How to cURL a JSP page [message #179429] Sun, 28 October 2012 03:12 Go to next message
Ankur Sinha is currently offline  Ankur Sinha
Messages: 2
Registered: October 2012
Karma: 0
Junior Member
I am trying to cURL my university login page. I want users to enter their university id and pass in my website, my website will curl to university website, authenticate and then allow them to login or give error accordingly. But my university portal is a jsp page. And after having posted in StackOverflow and other forums before, this is what I came up with. I need further help on where I am going wrong and how to rectify it.

<form class="form-horizontal" action="curl.php" method="POST">
        <div class="control-group">
            <label class="control-label" for="inputEmail">Username</label>
            <div class="controls">
                <input type="text" id="inputEmail" placeholder="Username">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputPassword">Password</label>
            <div class="controls">
                <input type="password" id="inputPassword" placeholder="Password">
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <label class="checkbox">
                    <input type="checkbox"> Remember me
                </label>
                <button type="submit" class="btn">Sign in</button>
            </div>
        </div>
    </form>


Now this is my curl.php file:

<?php
    $address = "http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin..jsp"; //site URL
    $post = "username=txtRegNumber&pass=txtPwd"; //Parameters to be sent. Written like GET.
    $welcomeMessage = "Welcome..."; //This is the message that is displayed when a login is successful

    $options = array(
       CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)', 
       CURLOPT_POST => true, //using post
       CURLOPT_URL => $address,  //where to go
       CURLOPT_POSTFIELDS => $post, //input params
       CURLOPT_RETURNTRANSFER => true, //Returns a string value of the request
       CURLOPT_SSL_VERIFYPEER => false, //Avoid SSL problems
       CURLOPT_COOKIEFILE => 'cookie.txt', //Save cookies
       CURLOPT_COOKIEJAR => 'cookies.txt' //Cookies located
       CURLOPT_USERPWD ==> [username]:[password]); 


          if (strpos($content, $welcomeMessage) !== false){ 
          /*
          Do whatever,I don't know what to do here though
          */
          }

      curl_close($ch); //close connections
    ?>


Please let me know where I am going wrong, why I am not able to login and after logging in, how to log out.

Thank you.
Re: How to cURL a JSP page [message #179431 is a reply to message #179429] Sun, 28 October 2012 08:43 Go to previous messageGo to next message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma: 0
Senior Member
On 28/10/12 04:12, Ankur Sinha wrote:
> I am trying to cURL my university login page. I want users to enter their university id and pass in my website,
> my website will curl to university website, authenticate and then allow them to login or give error accordingly.

There are quite many people who won't do that, login in to a site from a
third party page, as this can cause login credentials be stolen.


> But my university portal is a jsp page.

This don't make any difference how curl works.

> And after having posted in StackOverflow and other forums before, this
> is what I came up with. I need further help on where I am going wrong and how to rectify it.
>
>
[/color]
[color=blue]>  <form class="form-horizontal" action="curl.php" method="POST">[/color]
[color=blue]>           <div class="control-group">[/color]
[color=blue]>               <label class="control-label" for="inputEmail">Username</label>[/color]
[color=blue]>               <div class="controls">[/color]
[color=blue]>                   <input type="text" id="inputEmail" placeholder="Username">[/color]

You will not send any useful data to your curl page, see examples at 
w3schools: http://www.w3schools.com/html/html_forms.asp

[color=blue]>               </div>[/color]
[color=blue]>           </div>[/color]
[color=blue]>           <div class="control-group">[/color]
[color=blue]>               <label class="control-label" for="inputPassword">Password</label>[/color]
[color=blue]>               <div class="controls">[/color]
[color=blue]>                   <input type="password" id="inputPassword" placeholder="Password">[/color]

You will not send any useful data to your curl page, see examples at 
w3schools: http://www.w3schools.com/html/html_forms.asp


[color=blue]>               </div>[/color]
[color=blue]>           </div>[/color]
[color=blue]>           <div class="control-group">[/color]
[color=blue]>               <div class="controls">[/color]
[color=blue]>                   <label class="checkbox">[/color]
[color=blue]>                       <input type="checkbox"> Remember me[/color]
[color=blue]>                   </label>[/color]
[color=blue]>                   <button type="submit" class="btn">Sign in</button>[/color]
[color=blue]>               </div>[/color]
[color=blue]>           </div>[/color]
[color=blue]>       </form>[/color]
[color=blue]>  
[/color]
>
> Now this is my curl.php file:
>
>
[/color]
[color=blue]>  <?php[/color]
[color=blue]>       $address = "http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jsp"; //site URL[/color]
[color=blue]>       $post = "username=txtRegNumber&pass=txtPwd"; //Parameters to be sent. Written like GET.[/color]

You need to set the login name and password, in this case you just using 
static values txtRegNumber / txtPwd, you need to assign those dynamically.
See http://www.php.net/manual/en/language.variables.basics.php

[color=blue]>       $welcomeMessage = "Welcome..."; //This is the message that is displayed when a login is successful[/color]
[color=blue]> [/color]
[color=blue]>       $options = array([/color]
[color=blue]>          CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)',[/color]
[color=blue]>          CURLOPT_POST => true, //using post[/color]
[color=blue]>          CURLOPT_URL => $address,  //where to go[/color]
[color=blue]>          CURLOPT_POSTFIELDS => $post, //input params[/color]
[color=blue]>          CURLOPT_RETURNTRANSFER => true, //Returns a string value of the request[/color]
[color=blue]>          CURLOPT_SSL_VERIFYPEER => false, //Avoid SSL problems[/color]
[color=blue]>          CURLOPT_COOKIEFILE => 'cookie.txt', //Save cookies[/color]
[color=blue]>          CURLOPT_COOKIEJAR => 'cookies.txt' //Cookies located[/color]
[color=blue]>          CURLOPT_USERPWD ==> [username]:[password]);[/color]
[color=blue]> [/color]

You need to make the connection to the site, see example at php.net:
http://www.php.net/manual/en/function.curl-init.php

[color=blue]>             if (strpos($content, $welcomeMessage) !== false){[/color]
[color=blue]>             /*[/color]
[color=blue]>             Do whatever,I don't know what to do here though[/color]
[color=blue]>             */[/color]
[color=blue]>             }[/color]

You should make error checks, see examples at php.net:
http://www.php.net/manual/en/function.curl-errno.php
http://www.php.net/manual/en/function.curl-error.php

When you confirm that you have logged in, you have to be sure that the 
string you look for don't include HTML tags.

[color=blue]>         curl_close($ch); //close connections[/color]
[color=blue]>       ?>[/color]
[color=blue]>  
[/color]
>
> Please let me know where I am going wrong, why I am not able to login and after logging in, how to log out.

Drop the cookie, if you want the university web server to know it, make
a curl request to the logout link/page.


Good luck with your school assignment.

--

//Aho
Re: How to cURL a JSP page [message #179432 is a reply to message #179431] Sun, 28 October 2012 12:23 Go to previous messageGo to next message
Ankur Sinha is currently offline  Ankur Sinha
Messages: 2
Registered: October 2012
Karma: 0
Junior Member
On Sunday, 28 October 2012 14:13:48 UTC+5:30, J.O. Aho wrote:
> On 28/10/12 04:12, Ankur Sinha wrote:
>
>> I am trying to cURL my university login page. I want users to enter their university id and pass in my website,
>
>> my website will curl to university website, authenticate and then allow them to login or give error accordingly.
>
>
>
> There are quite many people who won't do that, login in to a site from a
>
> third party page, as this can cause login credentials be stolen.
>
>
>
>
>
>> But my university portal is a jsp page.
>
>
>
> This don't make any difference how curl works.
>
>
>
>> And after having posted in StackOverflow and other forums before, this
>
>> is what I came up with. I need further help on where I am going wrong and how to rectify it.
>
>>
>
>>
[/color]
[color=blue]>  [/color]
[color=teal]>>  <form class="form-horizontal" action="curl.php" method="POST">[/color]
[color=blue]>  [/color]
[color=teal]>>           <div class="control-group">[/color]
[color=blue]>  [/color]
[color=teal]>>               <label class="control-label" for="inputEmail">Username</label>[/color]
[color=blue]>  [/color]
[color=teal]>>               <div class="controls">[/color]
[color=blue]>  [/color]
[color=teal]>>                   <input type="text" id="inputEmail" placeholder="Username">[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  You will not send any useful data to your curl page, see examples at [/color]
[color=blue]>  [/color]
[color=blue]>  w3schools: http://www.w3schools.com/html/html_forms.asp[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=teal]>>               </div>[/color]
[color=blue]>  [/color]
[color=teal]>>           </div>[/color]
[color=blue]>  [/color]
[color=teal]>>           <div class="control-group">[/color]
[color=blue]>  [/color]
[color=teal]>>               <label class="control-label" for="inputPassword">Password</label>[/color]
[color=blue]>  [/color]
[color=teal]>>               <div class="controls">[/color]
[color=blue]>  [/color]
[color=teal]>>                   <input type="password" id="inputPassword" placeholder="Password">[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  You will not send any useful data to your curl page, see examples at [/color]
[color=blue]>  [/color]
[color=blue]>  w3schools: http://www.w3schools.com/html/html_forms.asp[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=teal]>>               </div>[/color]
[color=blue]>  [/color]
[color=teal]>>           </div>[/color]
[color=blue]>  [/color]
[color=teal]>>           <div class="control-group">[/color]
[color=blue]>  [/color]
[color=teal]>>               <div class="controls">[/color]
[color=blue]>  [/color]
[color=teal]>>                   <label class="checkbox">[/color]
[color=blue]>  [/color]
[color=teal]>>                       <input type="checkbox"> Remember me[/color]
[color=blue]>  [/color]
[color=teal]>>                   </label>[/color]
[color=blue]>  [/color]
[color=teal]>>                   <button type="submit" class="btn">Sign in</button>[/color]
[color=blue]>  [/color]
[color=teal]>>               </div>[/color]
[color=blue]>  [/color]
[color=teal]>>           </div>[/color]
[color=blue]>  [/color]
[color=teal]>>       </form>[/color]
[color=blue]>  [/color]
[color=teal]>>  
[/color]
>
>>
>
>> Now this is my curl.php file:
>
>>
>
>>
[/color]
[color=blue]>  [/color]
[color=teal]>>  <?php[/color]
[color=blue]>  [/color]
[color=teal]>>       $address = "http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jsp"; //site URL[/color]
[color=blue]>  [/color]
[color=teal]>>       $post = "username=txtRegNumber&pass=txtPwd"; //Parameters to be sent. Written like GET.[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  You need to set the login name and password, in this case you just using [/color]
[color=blue]>  [/color]
[color=blue]>  static values txtRegNumber / txtPwd, you need to assign those dynamically.[/color]
[color=blue]>  [/color]
[color=blue]>  See http://www.php.net/manual/en/language.variables.basics.php[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=teal]>>       $welcomeMessage = "Welcome..."; //This is the message that is displayed when a login is successful[/color]
[color=blue]>  [/color]
[color=teal]>> [/color]
[color=blue]>  [/color]
[color=teal]>>       $options = array([/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)',[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_POST => true, //using post[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_URL => $address,  //where to go[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_POSTFIELDS => $post, //input params[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_RETURNTRANSFER => true, //Returns a string value of the request[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_SSL_VERIFYPEER => false, //Avoid SSL problems[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_COOKIEFILE => 'cookie.txt', //Save cookies[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_COOKIEJAR => 'cookies.txt' //Cookies located[/color]
[color=blue]>  [/color]
[color=teal]>>          CURLOPT_USERPWD ==> [username]:[password]);[/color]
[color=blue]>  [/color]
[color=teal]>> [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  You need to make the connection to the site, see example at php.net:[/color]
[color=blue]>  [/color]
[color=blue]>  http://www.php.net/manual/en/function.curl-init.php[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=teal]>>             if (strpos($content, $welcomeMessage) !== false){[/color]
[color=blue]>  [/color]
[color=teal]>>             /*[/color]
[color=blue]>  [/color]
[color=teal]>>             Do whatever,I don't know what to do here though[/color]
[color=blue]>  [/color]
[color=teal]>>             */[/color]
[color=blue]>  [/color]
[color=teal]>>             }[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  You should make error checks, see examples at php.net:[/color]
[color=blue]>  [/color]
[color=blue]>  http://www.php.net/manual/en/function.curl-errno.php[/color]
[color=blue]>  [/color]
[color=blue]>  http://www.php.net/manual/en/function.curl-error.php[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  When you confirm that you have logged in, you have to be sure that the [/color]
[color=blue]>  [/color]
[color=blue]>  string you look for don't include HTML tags.[/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=blue]>  [/color]
[color=teal]>>         curl_close($ch); //close connections[/color]
[color=blue]>  [/color]
[color=teal]>>       ?>[/color]
[color=blue]>  [/color]
[color=teal]>>  
[/color]
>
>>
>
>> Please let me know where I am going wrong, why I am not able to login and after logging in, how to log out.
>
>
>
> Drop the cookie, if you want the university web server to know it, make
>
> a curl request to the logout link/page.
>
>
>
>
>
> Good luck with your school assignment.
>
>
>
> --
>
>
>
> //Aho

I am making this for my college out of my own interest after conducting a survey. So this is not my assignment and people said they won't sign up freshly and they wanted to login using existing ids and passwords provided by the university.
Re: How to cURL a JSP page [message #179433 is a reply to message #179432] Sun, 28 October 2012 14:04 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 10/28/2012 8:23 AM, Ankur Sinha wrote:
> On Sunday, 28 October 2012 14:13:48 UTC+5:30, J.O. Aho wrote:
>> On 28/10/12 04:12, Ankur Sinha wrote:
>>
>>> I am trying to cURL my university login page. I want users to enter their university id and pass in my website,
>>
>>> my website will curl to university website, authenticate and then allow them to login or give error accordingly.
>>
>>
>>
>> There are quite many people who won't do that, login in to a site from a
>>
>> third party page, as this can cause login credentials be stolen.
>>
>>
>>
>>
>>
>>> But my university portal is a jsp page.
>>
>>
>>
>> This don't make any difference how curl works.
>>
>>
>>
>>> And after having posted in StackOverflow and other forums before, this
>>
>>> is what I came up with. I need further help on where I am going wrong and how to rectify it.
>>
>>>
>>
>>>
[/color]
[color=teal]>> [/color]
[color=royalblue]>>>  <form class="form-horizontal" action="curl.php" method="POST">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>            <div class="control-group">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                <label class="control-label" for="inputEmail">Username</label>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                <div class="controls">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                    <input type="text" id="inputEmail" placeholder="Username">[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>>  You will not send any useful data to your curl page, see examples at[/color]
[color=teal]>> [/color]
[color=teal]>>  w3schools: http://www.w3schools.com/html/html_forms.asp[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=royalblue]>>>                </div>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>            </div>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>            <div class="control-group">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                <label class="control-label" for="inputPassword">Password</label>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                <div class="controls">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                    <input type="password" id="inputPassword" placeholder="Password">[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>>  You will not send any useful data to your curl page, see examples at[/color]
[color=teal]>> [/color]
[color=teal]>>  w3schools: http://www.w3schools.com/html/html_forms.asp[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=royalblue]>>>                </div>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>            </div>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>            <div class="control-group">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                <div class="controls">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                    <label class="checkbox">[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                        <input type="checkbox"> Remember me[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                    </label>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                    <button type="submit" class="btn">Sign in</button>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>                </div>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>            </div>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>        </form>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>  
[/color]
>>
>>>
>>
>>> Now this is my curl.php file:
>>
>>>
>>
>>>
[/color]
[color=teal]>> [/color]
[color=royalblue]>>>  <?php[/color]
[color=teal]>> [/color]
[color=royalblue]>>>        $address = "http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jsp"; //site URL[/color]
[color=teal]>> [/color]
[color=royalblue]>>>        $post = "username=txtRegNumber&pass=txtPwd"; //Parameters to be sent. Written like GET.[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>>  You need to set the login name and password, in this case you just using[/color]
[color=teal]>> [/color]
[color=teal]>>  static values txtRegNumber / txtPwd, you need to assign those dynamically.[/color]
[color=teal]>> [/color]
[color=teal]>>  See http://www.php.net/manual/en/language.variables.basics.php[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=royalblue]>>>        $welcomeMessage = "Welcome..."; //This is the message that is displayed when a login is successful[/color]
[color=teal]>> [/color]
[color=royalblue]>>> [/color]
[color=teal]>> [/color]
[color=royalblue]>>>        $options = array([/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)',[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_POST => true, //using post[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_URL => $address,  //where to go[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_POSTFIELDS => $post, //input params[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_RETURNTRANSFER => true, //Returns a string value of the request[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_SSL_VERIFYPEER => false, //Avoid SSL problems[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_COOKIEFILE => 'cookie.txt', //Save cookies[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_COOKIEJAR => 'cookies.txt' //Cookies located[/color]
[color=teal]>> [/color]
[color=royalblue]>>>           CURLOPT_USERPWD ==> [username]:[password]);[/color]
[color=teal]>> [/color]
[color=royalblue]>>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>>  You need to make the connection to the site, see example at php.net:[/color]
[color=teal]>> [/color]
[color=teal]>>  http://www.php.net/manual/en/function.curl-init.php[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=royalblue]>>>              if (strpos($content, $welcomeMessage) !== false){[/color]
[color=teal]>> [/color]
[color=royalblue]>>>              /*[/color]
[color=teal]>> [/color]
[color=royalblue]>>>              Do whatever,I don't know what to do here though[/color]
[color=teal]>> [/color]
[color=royalblue]>>>              */[/color]
[color=teal]>> [/color]
[color=royalblue]>>>              }[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>>  You should make error checks, see examples at php.net:[/color]
[color=teal]>> [/color]
[color=teal]>>  http://www.php.net/manual/en/function.curl-errno.php[/color]
[color=teal]>> [/color]
[color=teal]>>  http://www.php.net/manual/en/function.curl-error.php[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>>  When you confirm that you have logged in, you have to be sure that the[/color]
[color=teal]>> [/color]
[color=teal]>>  string you look for don't include HTML tags.[/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=teal]>> [/color]
[color=royalblue]>>>          curl_close($ch); //close connections[/color]
[color=teal]>> [/color]
[color=royalblue]>>>        ?>[/color]
[color=teal]>> [/color]
[color=royalblue]>>>  
[/color]
>>
>>>
>>
>>> Please let me know where I am going wrong, why I am not able to login and after logging in, how to log out.
>>
>>
>>
>> Drop the cookie, if you want the university web server to know it, make
>>
>> a curl request to the logout link/page.
>>
>>
>>
>>
>>
>> Good luck with your school assignment.
>>
>>
>>
>> --
>>
>>
>>
>> //Aho
>
> I am making this for my college out of my own interest after conducting a survey. So this is not my assignment and people said they won't sign up freshly and they wanted to login using existing ids and passwords provided by the university.
>

I agree with J.O. You'll find a lot more people won't sign in using the
credentials from another site. Only those with no concept of security
will do it the way you want.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: How to cURL a JSP page [message #179441 is a reply to message #179429] Sun, 28 October 2012 22:12 Go to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Sat, 27 Oct 2012 20:12:03 -0700, Ankur Sinha wrote:

> I am trying to cURL my university login page. I want users to enter
> their university id and pass in my website, my website will curl to
> university website, authenticate and then allow them to login or give
> error accordingly.

As an example, look at the mechanism that e.g. "verified by visa" uses to
enable customers to enter their verification credentials when making
online transactions without those credentials being captured by the
trader or payment processing website.

Rgds

Denis McMahon
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: learn php in 17 hour
Next Topic: Requesting Help with a Regular Expression
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 13:27:32 GMT 2024

Total time taken to generate the page: 0.02351 seconds