+ Reply to Thread
Results 1 to 5 of 5

Thread: Automatic Login

  1. #1
    dragoneye_xp's Avatar
    dragoneye_xp is offline x10 Sophmore dragoneye_xp is an unknown quantity at this point
    Join Date
    Oct 2005
    Location
    Texas
    Posts
    165

    Automatic Login

    I wrote a script called "Dragoneye's Login Utility" that people can use to log into HTTP, HTTPS and FTP servers and added an optional autologin feature so it will act as a keepalive function -- every time someone goes to the home page, it will connect to all the servers in the autologin list (which is encrypted many times, by the way), then disconnect.

    I got the idea of using that feature to automatically connect and disconnect from my CPanel account every time my homepage is accessed so that I don't have to do it myself every two weeks. But when I tried testing to see if that would work with PHP fopen(), I get this error:

    Warning: fopen(http://...@): failed to open stream: Success in autologin.php on line 49

    What's that mean and how do I fix it?

  2. #2
    bigguy's Avatar
    bigguy is offline Retired bigguy is an unknown quantity at this point
    Join Date
    Mar 2005
    Location
    Canada
    Posts
    5,426

    Re: Automatic Login

    Whats on line 49 of your autologin.php ? This is obvious but its failing to open something or it looks that way.
    P.C. Tweakr - For all your computer and internet support
    P.C. Tweakr - For all your SMF help and support

  3. #3
    Bryon is offline Administrator Bryon has disabled reputation
    Join Date
    Apr 2005
    Location
    Northfield, NH
    Posts
    7,608

    Re: Automatic Login

    PHP Code:
    Warningfopen([url]http://...@[/url]): failed to open stream: Success in autologin.php on line 49 
    Is that the exact error? If it is, it's because your trying to open a stream with the URL "http://...@", which obviously is not a site/page/whatever.

    Also, I wouldn't recommend everytime someone goes to your page having it login. Make a cron script to do it once a day.. :-/ Whatever floats your boat though.

  4. #4
    dragoneye_xp's Avatar
    dragoneye_xp is offline x10 Sophmore dragoneye_xp is an unknown quantity at this point
    Join Date
    Oct 2005
    Location
    Texas
    Posts
    165

    Re: Automatic Login

    No, I use the $username.":".$password (but I guess PHP censors that part so people can't see your password.)

  5. #5
    dragoneye_xp's Avatar
    dragoneye_xp is offline x10 Sophmore dragoneye_xp is an unknown quantity at this point
    Join Date
    Oct 2005
    Location
    Texas
    Posts
    165

    Re: Automatic Login

    Here's the peice of code directy from the file that does that. Anything wrong with it?

    Code:
    for($x=0; $x<count($userfile); $x++){
    	$line=explode("||",trim(decoder($userfile[$x])));
    	$readuser=trim(urlencode(decoder($line[0])));
    	$readpass=trim(urlencode(decoder($line[1])));
    	$readsrv=trim(decoder($line[2]));
    	$readtype=trim(decoder($line[3]));
    	
    	$fp=fopen($readtype.$readuser.":".$readpass."@".$server, "r");
    	if($fp) echo $readuser."@".$readtype.$readsrv.": <font color='#00FF00'> Login successful.</font><br>";
    	else echo $readuser."@".$readtype.$readsrv.": <font color='#FF0000'> Couldn't log in.</font><br>";
    }
    Last edited by dragoneye_xp; 01-17-2006 at 06:47 PM.

+ Reply to Thread

Similar Threads

  1. Login
    By Tris10 in forum Free Hosting
    Replies: 8
    Last Post: 10-23-2006, 08:31 PM
  2. still can't login
    By powersports in forum Feedback and Suggestions
    Replies: 1
    Last Post: 09-08-2006, 02:41 PM
  3. Replies: 5
    Last Post: 08-09-2006, 03:05 PM
  4. login system help
    By brentcatoe in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 10-04-2005, 04:31 AM
  5. Cant see the site and login to cpanel
    By Jxwisniewski in forum Free Hosting
    Replies: 1
    Last Post: 04-05-2005, 04:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers