Page 1 of 1

Redirect to another page with created account

Posted: Fri Oct 16, 2009 9:40 pm
by hungtd7
Hi!

I want to create a website can redirect to another page while user enter in. And my website will auto login. This action hide with user.

I tried cURL (PHP) but i can not do that.

For example with user: user and password: password and Site : http://admin.5socks.net/


My Code:

Code: Select all

 
<?php
    $ch = curl_init();
    $POSTFIELDS = "user=[user]&pass=[pass]&action=login";
    
    curl_setopt($ch, CURLOPT_URL, "http://admin.5socks.net/cgi-bin/login.cgi");
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
    $str = curl_exec($ch);
    $return =curl_close($ch); 
?>
 


Thanks a lot.
Have a nice day :-)