Jump to content

SnaD

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by SnaD

  1. Thought about it, it doesn't work if user has pop-blocker on  :(
  2. I know that, but it wont work for me. I need a new window to be opened after I submit my form.
  3. Is there a way to open a new window without using JS?
  4. SnaD

    FTP Login?

    [!--quoteo(post=389457:date=Jun 29 2006, 04:11 PM:name=michaellunsford)--][div class=\'quotetop\']QUOTE(michaellunsford @ Jun 29 2006, 04:11 PM) [snapback]389457[/snapback][/div][div class=\'quotemain\'][!--quotec--] go to [a href=\"http://web-sniffer.net/\" target=\"_blank\"]http://web-sniffer.net/[/a] put in your url like this: [a href=\"http://www.example.com/ftp.php?log=username&pass=password\" target=\"_blank\"]http://www.example.com/ftp.php?log=username&pass=password[/a] select the "POST" radio header submit. [/quote] Nevermind, i figured it out. It was because of my stupid server. Anyways, I appreciate ur help. One more thing [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] die("Couldn't connect to $ftp_server"); Is there a way to insert html page in die() instead of just saying "Couldn't connect to $ftp_server"
  5. SnaD

    FTP Login?

    [!--quoteo(post=389434:date=Jun 29 2006, 03:36 PM:name=michaellunsford)--][div class=\'quotetop\']QUOTE(michaellunsford @ Jun 29 2006, 03:36 PM) [snapback]389434[/snapback][/div][div class=\'quotemain\'][!--quotec--] If you have unix, try curling the page curl -I -dlog=loginname -dpass=password [a href=\"http://www.example.com/ftp.php\" target=\"_blank\"]http://www.example.com/ftp.php[/a] the uppercase "I" will return the header only, so you can see where it's trying to send you. Copy the address and plug it in your browser. [/quote] No, I don't have unix :(
  6. SnaD

    FTP Login?

    Hey guys, I have one more problem. Here is my code to ftp.php. Smth strange is happening. When I submit my form, IE says that my ftp.php not found (404), whereas Firefox connects to ftp, but gives me "426 Connection Closed" error. Anyone knows how to fix this? Thanks. [code] <?php                      $ftp_server = "mysite.com"; $ftp_user = $_REQUEST['log']; $ftp_pass = $_REQUEST['pass']; // set up a connection or die $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); // try to login if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {    header("Location: ftp://$ftp_user:$ftp_pass@$ftp_server"); } else {    include 'error_ftp.htm'; } // close the connection ftp_close($conn_id); ?> [/code]
  7. SnaD

    FTP Login?

    Here is a part of my code: <?php if(isset($_POST['submit'])) { header("Location:ftp://".$_GET['log'].":".$_GET['pass']."@server.com"); exit; } else { ?> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="titleblue"> Username&nbsp; </td> <td> <input name="log" type="text" style="color:013B84;font-weight:bold;background-color:transparent;border-color:013B84;border-width:1;border-style:solid"> </td> </tr> <tr> <td class="titleblue"> Password&nbsp; </td> <td> <input name="pass" type="password" style="cime-mode:active;color:013B84;font-weight:bold;background-color:transparent;border-color:013B84;border-width:1;border-style:solid"> </td> </tr> <tr> <td width="10">&nbsp; </td> <td align="center"> <input type="submit" name="submit" value="Login" style="cursor:hand;font-weight:bold;color:000099;background-color:white;border-color:013B84;border-width:1;border-style:solid"> </td> <td width="30">&nbsp; </td> </tr> </table> <?php } ?> I get this warning: Warning: Cannot modify header information - headers already sent by (output started at C:\site\NEW\client_access.php:5) in C:\site\NEW\client_access.php on line 85 Any ideas? What am I doing wrong?
  8. SnaD

    FTP Login?

    It did work but not exactly how I wanted it to. It just outputs "Connected as user@server.com," whereas I want it to redirect user to ftp server. Anyone? Appreciate it.
  9. SnaD

    FTP Login?

    [!--quoteo(post=386709:date=Jun 21 2006, 09:45 PM:name=michaellunsford)--][div class=\'quotetop\']QUOTE(michaellunsford @ Jun 21 2006, 09:45 PM) [snapback]386709[/snapback][/div][div class=\'quotemain\'][!--quotec--] tried the sample code on php.net yet? [a href=\"http://us2.php.net/manual/en/function.ftp-login.php\" target=\"_blank\"]http://us2.php.net/manual/en/function.ftp-login.php[/a] [/quote] Thanks, im gonna try it now.
  10. Hey guys. I really need a php script that would ask user for ftp login and pass. If they are correct, script would get user to specific ftp; otherwise, error. Anyone? Thanks in advance.
  11. Hey guys. I really need a php script that would ask user for ftp login and pass. If they are correct, script would get user to specific ftp; otherwise, error. Anyone? Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.