Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





How To Write A Simple Login Code For Users To Be Able To Login To My Site.


does anybody know how to write a simple login code for users to be able to login to my site.




View Complete Forum Thread with Replies

Related Forum Messages:
Write A Login System For My Site
I am trying to write a login system for my site. The way it works now is a form with a UserName and UserPass sends those values to login.php login.php then looks at the values and checks if the user is logged in.

If the user isn't already logged in via a cookie, then the user has a cookie created and gets to view some private information. Code:

View Replies !
IE Users Not Being Able To Login To PHP Built Site
A few weeks ago, some of our members started reported not being able to login with IE. I have XP and get automatic updates.

I used to be able to login using IE. I found that I now can not login using IE, but can login to members section using Netscape. The site is built in PHP and the site files have not changed.

Anyone else experiencing this type of problem with IE? I've already tried accepting ALL cookies, activex settings are on, dumping cookies, temp files, security setting is LOW.

View Replies !
Login On Site Insn't Working For Some Users
I have recently completed a site which involves registering and logging in to reach the members area and I have had a few feedbacks saying that they kept getting knocked back on logging in.

I tried it myself on my computer with their login details and it worked but I have seen it not working on another computer. They have cookies enabled, so I can't see what the problem is.

The login simply sets a cookie equal to their id no. - a long int. - no sessions.

View Replies !
Login Problem - Script For Login To My Web Site
i have a php script for login to my web site.it works very well when i test it in localhost but when i upload it to my site it is not allowing me login. Code:

View Replies !
Email An HTTPS Address With Encrypted Login For Users To "Click And Login"
I have developed a web site that monitors the state of the user's routers (UP/DOWN & WHY) it has the usual login web page, since the web site monitors the devices and sends emails when there is a problem, i wanted to send an email with an embedded https link, where the user could click and be directed straight onto the web site, without the need to login.

View Replies !
Users Cannot Login
i got about 80 emails from my site users saying they couldnt login. When they login, it displays their user menu, where they can edit their profile, upload photos, ect ect.

They are saying they dont see the menu anymore, and they see hello guest, which is displayed if a session is not set.

Funny thing is ... i havent changed ANYTHING at all in over a month .. and i can login just fine. But 80 users in 1 day not being able to login ... somthing is wrong? Does anyone have any possible clue what could of made this happen?

View Replies !
Hiding Login Box To Users
it has login box on the main page and when u sign in it still shows the login box
i was wondering how i would hide the login box for logged in users.

View Replies !
Redirect Users To Specific Url After Login
Using Dreamweaver i'm trying to redirect a successful login user to his/her specific directory in the root site. This url or directory is defined in a MySQL database. This db has 3 columns: username (PK), password and redirect (where i decide each user's url).

My login authentication script is working just fine (used Macromedia server behaviors: login, logout, restrict access to page, no need to register users -i do that manually). code...

View Replies !
Login System Using Linux Users
I'm running a linux system I would like to create a login system based
upon the users and passwd of my linux box how could I do this ?

View Replies !
Stopping Multiple Users Using 1 Login
does anyone know any mysql transaction locking methods of some sort to stop a user from logging in at multiple places with one username, it must only allow one user with the username use that account. is there any way to stop that, as i have a subscription that people pay for and i want one user per username, how is that possible because there are many factors i had to consider, like if a user's session is loggged in a db and then they get removed when they logoff, but what if they don't logoff, what then?

View Replies !
Display The Users Name Upon Successful Login.
I have a login.php, members.php and members.html. Right now, if you login successfully you are taken to members.php. I want to display the users name upon successful login. I can do this in members.php, however I want to display it in members.html (because in HTML pages I can make layout tables/cells). I store the users first name (f_name) and last name (l_name) in session variables with the following code (from login.php):

View Replies !
Login Feature For Both Admin And Users
what is best to do with login in for users and admin on the same screen and also how to do it through php.

Should I have 2 seperate databases or just one with an extra admin field with yes or no as their options. Also if the users are not in the database or the password is incorrect how to i bring them back to the login screen with an error message?

View Replies !
Write A Script That Should Login To The Remote Server.
I'm trying to write a script that should login to the remote server.
I wrote the script that I included below, but when I run it, I receive a page with the login form again, and I expect to see the page that appears right after the login. In other words, the script doesn't work properly, the remote server doesn't let me in.

The remote server is not secure (no https) and I suppose they have no any kind of protection against the automated parsing, I'm not intruding the bank, and I suppose that the error is somewhere in the script, or I need to include some additional params in the CURL request.

I'm new to CURL, so I have 4 questions, and I would really appreciate if someone could provide some help or info.

1) The remote server uses redirect.
When I login normally through the web browser, in my IE address bar I don't get the url of the script that is in the form action tag. In other words, in the post form I have form method="post" action="some_url", and when login is successful, I see http://someserver.com/another_url in the browser.

Question: Is it possible that my CURL script below has no params for processing this redirect properly?

2) The remote server is created in jsp probably (it writes JSESSIONID).

Question: Is it possible that there are some special settings for pages in jsp, or jsp cookies/sessions are not properly passed?

3) Authentication

Question: Maybe I need to set CURLOPT_HTTPAUTH or something? I tried to set curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); but it didn't help.

4) Protection

Question: Is there any way the server could detect that I'm using CURL? Maybe there is some HTTP header string attached or something? May this be because of some specific CURL lib version? Code:

View Replies !
Login Problem - Can't Login(login Is Done In Index.php)
This is origially PMsys, I have edited it, and here is what I have done with the original
replace all $_COOKIE into $_SESSION changed all setcookie() into session_start() and defined those $_SESSION now the problem is I can't login(login is done in index.php), does anyone here got an idea why? I uploaded the whole pakage, but I think you only need to look at index.php and include/global.php.

View Replies !
Simple Login Sys
I want a simple login sys, That saves all deatails to a txt file, I want it so that when a name is entered then it will name the file as the name. So when someone create an acct, There will be a place for there name, there Email & there password. I hope you get it so far. Well here is the php PHP Code:

<?php

$ip = getenv('REMOTE_ADDR');

$date=date("d/m/y, g:i a");;

$data = "<br /> IP: ".$ip. "<br /> Time: ".$date. "<br /> Name: ".$_POST["name"]. "<br /> E-Mail: ".$_POST["email"]. "<br /> Password: ".$_POST["password"];   

$fp = fopen('$_POST["name"]', 'w');

fwrite($fp,$data);

fclose($fp);

?>

View Replies !
Script Which Gets The Users Login Name And Makes It An Image
im creating a script which gets the users login name and makes it an image with a font which works..

$text = $_SESSION['username'];
$width = 23 * strlen($text);
$im = @imagecreate ($width,30)or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 150, 174, 101);
$text_color = imagecolorallocate($im, 225,225, 225);
$black = imagecolorallocate($im, 0, 0, 0);
imagettftext($im, 20, 0, 0, 20, $black, "arial.ttf", $text);
imagepng($im);
imagedestroy($im);

the only problem is that the length of the text is really off sometimes...
is there anyway i can sort this out?

View Replies !
Linux System Users Login/Password?
Has anyone managed to code anything that will verify the username and
password of a user against the /etc/shadow file?

I need to authenticate users based on their local system accounts, but
unfortunately need to do this without recompiling PHP or Apache with custom
modules.

So far I've managed to pull all of the shadow password strings out and into
a database, but is there any way of 'matching' the encrypted strings if you
are given the plain text version, like with md5?

View Replies !
Sessions - Write A Log File And Hit Counter Along With A Login Interface
Any pitfalls or stuff I need to worry about when working with sessions? I
want to write a log file and hit counter along with a login interface and
I'm trying to learn this stuff.

http://us.php.net/session

Just wondering if theres anything that I need to keep in mind while I work
on it?

View Replies !
Simple Login Script
im creating a simple login script and i dont have a problem yet but im wondering if there is a way that i can improve this bit of code, this is what i have for validating the fields. Code:

View Replies !
Simple Login Page
I would like to ask on how to create a PHP script with my login page. These are my details:

txtusername -> for username
txtpassword -> for password

$host = "localhost"
$database = "crismon"

View Replies !
How To Login Into A Site From Another One?
I've got 'foo1.com' where users log in by using PHP sessions. I store login and password hash into the session, and each time one user access a webpage, I check them.

'foo1.com' and 'foo2.com' are on different machines, and that the 'users' table (which contains user+pass info) is placed on 'foo1.com'

But I've created 'foo2.com' and want users not to log in again on another login point, but using the 'foo1.com' login. I mean, if you are logged in 'foo1.com' you are also logged in 'foo2.com'.

'foo1.com' and 'foo2.com' are on different machines, and the 'users' table (which contains user+pass info) is placed on 'foo1.com'

How to manage it? Must I create a webservice or something similar? Is there any standar API?

View Replies !
Create A Login That Stores A Cookie On The Users Computer
I am trying to create a login that stores a cookie on the users computer using PHP. Everything works fine when the user inputs the wrong password (tells them that they are wrong), unless they enter the right password then I get this error message. Code:

View Replies !
Write A Simple PHP Code To Tell Me When A Check Box Has Been Checked
I have a very little problem with check boxes. How can I write a simple PHP code to tell me when a check box has been checked, and then use the name of the checkbox in a function.

View Replies !
Simple Login Form That Uses Session?
how to make a simple login form that uses session?

View Replies !
Simple Session Login Problem
I created a php page that will create a session for a user. My problem
is that once they are logged in, I dont know how to send them to the
secure page. I dont know where to place the following lines of code:
(also not sure where on the server the pages are placed)

header("Location: http://www.mysite.com/index.html");
exit;

Original code-------------------------------------------------
<?
session_start();
?>
<html>
<head>
<title> </title>
</head>
<body>
<?
$_Username = "user";
$_Password = "password";
// If the form was submitted
if ($_POST['Submitted'] == "True") {
// If the username and password match up, then continue...
if ($_POST['Username'] == $_Username && $_POST['Password'] ==
$_Password) {
// Username and password matched, set them as logged in and
set the
// Username to a session variable.
$_SESSION['Logged_In'] = "True";
$_SESSION['Username'] = $_Username;
}
}
if ($_SESSION['Logged_In'] != "True") {
echo "<form method="post" action="" . $_SERVER['PHP_SELF'] .
"">
Username: <input type="textbox" name="Username"><br />
Password: <input type="textbox" name="Password"><br />
<input type="hidden" name="Submitted" value="True">
<input type="Submit" name="Submit">
</form>";
}
else
{
echo "You are logged in as: <b>" . $_SESSION['Username'] . "</b>
<br /><a href="" . $_SERVER['PHP_SELF'] .
"?mode=logout">Logout</a>";
}
if ($_GET['mode'] == "logout") {
session_start();
$_SESSION = array();
session_destroy();
echo "<META HTTP-EQUIV="refresh" content="1; URL=" .
$_SERVER['PHP_SELF'] . "">";
}
?>

<p>&nbsp;</p>
</body>
</html>

View Replies !
Simple Login Script Using Mysql
does anyone know of a simple login script using mysql? iv tried a couple n i swore i saw one around here someone but couldnt find it.

View Replies !
Simple User Login Script...
I want a simple user login page/script that does not run over a DB. The main reason for this is to ease deployment and because security is not a huge deal for the data being protected. Here's what I'm trying now. It isn't working. Code:

View Replies !
CURL :: Simple Login Not Working
cURL script:

<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,"http://www.crackarcade.com");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, "username=games&password=games");
curl_exec ($curl);
curl_close ($curl);
echo $curl;
?>

View Replies !
Cookies With Simple Login Script
Am working on a simple login script for a site I am developing, and I want to have cookies working, with a md5'd username and pass in each, but I can't for the life of me get them to work properly, ending up with a cannot modify header output. Code:

View Replies !
Simple User Login Program?
I was wondering if there is a free program out there that might work like phpbb when it comes to installing. But it sets up a user login system.

View Replies !
Looking For Simple MySql Login/Session
I've never had any password protection so far so, I'm rather new to the coding...(I know the process though--)

Anyway, I've been looking for a good tutorial on google and on the search option on these forums for a way to easily have a secure, yet simple register/login/session pages--Explaining tutorial...

Also, I will edit the register form so that it carries more information, I'd prefer if the tutorial would just look for username then password in the database and ignore any other columns..

View Replies !
Simple Login Script Question...
I'm trying to write a VERY simple PHP login script that basically prompts for a password, and if the password is correct, redirects to one page, and if it is incorrect, redirects to another.

The problem I'm having is getting the redirects to work properly. If I put them below the HTML, the header will crash.. Code:

View Replies !
How To, Login To A Site With Curl
I wanted to know if anyone knew how to, Login to a site with curl, store the cookie, then get a page from that site.

View Replies !
Php Login To Other Site Using Curl
I want to use php to login to another site and then go to that site using the screen name I was logged into and view a webpage on that site and submit a form and searching for text.

View Replies !
Multi-Site Login
Can anyone give me any help on one-login multi-site User authentication system. The problem I have is that it uses the same site but it will have number of different domains. Depending on which domain is used to access the site will change how the site will function.

View Replies !
Login In A Diferent Site
Not without searching, which you all can do too. I only say what I said above because I researched into how to join two user database tables because I was thinking of linking two Joomla sites together. From what I read at that time, and from what I know now as a PHP/MySQL Programmer, you would have to have two different connections to two databases.

Then, you have to check the entered username/password from both tables, choose which table to use the user information from, etc. I guess if you wanted to keep it more on the simple side, you might be able to do it without too many problems. I'm sure there are others who have actual practical experience in this, so I'll let them give concrete details.

View Replies !
Automatic Site Login
I was wondering if anyone has an easy way to do automatic site logins in PHP if the username and password are known (obviously). The Authentication Type is Basic - using standard HTTP 1.1 login, base64, encoded passwords.

View Replies !
Creat A Simple Login System Using Sessions
I am trying to creat a simple login system using sessions, I have the form working which passes onto the following code, the if/else statement works but it is not creating sessions as I want it to so I can check on other pages to see i they have loged in or now. PHP Code:

View Replies !
How To Create A Session For A Simple Login Form
can anybody tell me how to make a session for a simple login form.
If you know please tell me with a coding.

View Replies !
Simple Login Script With Cookie And Email
im looking for a way to get a login page that people fill in a form with a few bits of info and press submit. All that information gets emailed to me and a cookie is set. i would like it so i can just include this code at the top of all the pages i need to protect.

View Replies !
.htaccess And Simple Login Form On The Page
I apply .htacces files to protect directories. I would like create simple login form (not standard pop up login form), authenticate users thru my files with username-password and avoid pop-up login.

View Replies !
Make A Login Script For My Site
i need help bad. I have been trying to make a login script for my site but it is driving me nuts! here is what i got so far:

This is tha page that is supposed to check the input from the form and set session variables:
<?PHP
if (session_is_registered(user))
{
die("You Already are logged in");
}

$fp = fopen("users" , "r");

$contents = fread($fp, filesize ("users"));

fclose($fp);

if (strstr($contents, $user)) {

if (strstr($contents, $pass)) {

session_start();
session_register(user);
header("location: Post.php");
}
else {
die("<H1>Password was not found!</h1>");
}
}
else {
die("<center><H1>That name was not found!</h1></center>");
}
?>

okay here is the posting page that is supposed to check for the session variable:

<?php

if (session_is_registered(user) == FALSE )
{
Header("Location: Poster.php");
}

echo "<form action=$PHP_SELF method=POST>Put the name of your article here:<br><input type=text name=title><br><br><br>";
echo "Type you text here:<br><textarea name=body rows=16 cols=67>";
echo "</textarea><br><br><input type=submit name=submit value=Submit></form>";

if ($submit) {

$lenght = strlen($body);

if ($title == "" || $body == "") {
die("Sorry you left a field blank");
}

$fp = fopen("$title", "w");

fwrite($fp, $body, $lenght);

fclose($fp);

$lenght = strlen($title);

$fp = fopen("articles", "w");

fwrite($fp, $Title, $lenght);

fclose($fp);
}
?>

View Replies !
How Do I Auto-login To A Protected Site?
Using Apache web server, I am protecting certain directories with
..htaccess files. Is there a way in PHP where I can automatically
sjbmit login credentials without having to type them into the gray box
each time? I'm using PHP 4.4.4

View Replies !
Site Login Withn CUrl
I am trying to automate a submission I do daily.

Manually, I access a page of the type https://www.signin.example.com/loginForm.html. When I fill the username / password, I am automatically redirected to another https page, of the type https://home.example.com and the page confirms that I am logged in, from there on I can update my posting.

When I am logged in, there are 2 cookies set on my computer, one by home.example.com and one by signin.example.com.

When I log out both cookies are gone.

Now, I am trying to automate that login, and I am using the following script as example: http://curl.haxx.se/libcurl/php/examples/?ex=ebay_login.php

Here is my code:

$id = "id";
$password = "password";
$cookie_file_path = "absolute_server_path/httpdocs/cookiejar/";
$LOGINURL = "https://www.signin.example.com/loginForm.html";
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$POSTFIELDS = 'UserName='.$id.'&hiddenVar1=hiddenVar1Value&UserPass='.$password;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$LOGINURL);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https

$result=curl_exec ($ch);
curl_close ($ch);

echo("Results: <br>".$result);

//post info for login
$LOGINURL = "https://www.signin.example.com/loginForm.html";
$reffer = "https://www.signin.example.com/loginForm.html";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$LOGINURL);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, $reffer);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$result = curl_exec ($ch);
curl_close ($ch);

echo("Results: <br>".$result);

When I run this code, I don't even get the output from the las echo statement (Results: <br> ...), as the server I query automatically redirects me to the same login page https://www.signin.example.com/loginForm.html, but with no error messages or explanations.

Now, as you can see I attempt to have the cookies created in a folder on my web server, using an absolute path absolute_server_path/httpdocs/cookieJar. Can this be one of the problems, does the cookieJar have to sit in my httpsdocs folder instead of the httpdocs? I set the absolute_server_path/httpdocs/cookiejar/ folder to 997 I believe.

Also, when I post the info for login in the second part of the code, I am not sure if $LOGINURL should be https://www.signin.example.com or https://www.home.example.com?

Also, I am not comfortable wit cUrl at all yet, so I am doing something else wrong.

View Replies !
Integrating Forum And Site Login
What is best ready-made forum system, if I want to use same user-management for the www-site? Does phpBB allow this?

If the forum has registration form/page, mysql-database of users etc, I suppose I mostly need just a login.php script, that I can use for my main site? Best would ofcourse be if the forum includes ready made scripts for that purpose.

View Replies !
ASPX LOGIN Required Site
I need to scrape information from a website that requires ASPX login (the first page is a form which asks for user name and password). I am just wondering which method I should use to do this. Can I use cURL to fill in the form and send the login information to the server then access the page or can I login first to generate a cookie and then use that cookie to access the page (behind the login).

View Replies !
Session Problem - Login Screen Continually Reloads After Pressing The Login Button
I am trying to get sessions to work on a log in screen to give certain
users access to certain pages/directories. The problem is that when
the login button is pushed (or the enter key pressed) the login screen
redraws, never loading the next page. I don't get any error messages.
I am using FreeBSD-5.1/Apache-2.0.46/MySQL-4.1.0.1/PHP-4.4.3.4

I have pasted the code below:

View Replies !
Create A Simple Login Page Using Php And A Post Form.
trying to create a simple login page using php and a post form.

The following requirement holds,
1. there should NOT be any DB.
2. One user and one password is enough (yeah, said it was a simple
one...)

Tried with a function check_user() in a lib php-file, and a post form
in the login page. Code as follow:

<?php

function check_user(){
global $userfield, $pwdfield;

if( strcmp($_POST[$userfield],"user") == 0 ) {

if( strcmp($_POST[$pwdfield],"pwd") == 0 ) {
// Correct user
echo("correctdir/album.htm");
}
else {
// Wrong pwd
echo("../somdir/default.htm");
}
else {
// wrong user
echo("../otherdir/default.htm");
}
}

}
?>

and the login page for is:
<?PHP
require('../somelib/login_lib.php');
?>

....
<form name="form1" method="post" action="<?php check_user();?>">
<input type="text" name="userfield" >
<input type="password" name="pwdfield" >
<input type="submit" name="Log in" value="Log in">
</form>

View Replies !
Login Lgout And Login Without Closing Session Gives Redirection Error
I am stepping through a text book that sets up different websites. The
one I am testing is user registration.

I set up the scripts and this is what I observe:

Login (verifying against a mysql db) - no problem.
Logout - no problem.

Close the browser and try again - no problem.

Login > Logout > Login WITHOUT closing browser I get:

An error occurred while loading http://login.php when it should redirect
me to http://localhost/index.php.

I read somewhere on the news group that the
header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname
($_SERVER['PHP_SELF']) . "/index.php") (in my example code) is called
once and so the error?

The logout.php destroys the $_SESSION variables, session itself and any
cookies so I thought it would be "like new" the second time around?

It appears to be linked to sessions but don't know enough to know how to
correct.

View Replies !
Login Script Doesn't Display If The Login Is Correct Or Incorrect.
Below is the script I am using for my login page. It doesn't display if the login is correct or incorrect. All it does is clear the username and password box when I hit submit. I want it to display an error message if the login is incorrect and if it is correct redirect them to their own web page. I am putting the MySQL connection script in the header of the login.html is this wrong? Can someone please give me some pointers on how to get this script working?

<?php session_start();
$username = $_POST['username'];
$userpass = md5($_POST['password']);
$sql = "select * from usertable where username='$username' and password='$userpass'";
$result = mysql_query($sql);
if (mysql_num_rows($result)!= 1) {
$error = "Login failed";
} else {
$row = mysql_fetch_array($result);
$_SESSION['username'] = "$username";
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
header("Location: h*tp://www.w-------.com/$row['USLP']");
}
?>

View Replies !
Browser Based Ftp Login - HTML Page Where Users Type In A Username And Password
First let me say that I don't really know PHP at all. What I want to do is have an HTML page where users type in a username and password. After they click submit they are redirected to
"ftp://username:password@domain.com" where they can download and upload files to their folder.
Each username will have a folder in the directory that has the same name as the username. `So if "Mark" logs in, I want him to see the contents of the "Mark" folder where he can upload and download files. I don't want him to have access to anything else.

As I know nothing, I did a lot of reading up and researching on how to do this (lots of great information on this site by the way) but the PHP code might still be way off.

Here is the code I have so far:
for the html login page:
<html>
<body>
<form name="form" method="post" action="ftp.php">
Username: <input name="username" type="text" size="30">
Password: <input name="password" type="password" size="30">
<input type="Submit" size="8" value="Submit"></p>
</form>
</body>
</html>

the code for the ftp.php page is :
<?php

$ftp_server = 'domain.com' //domain being the future website domain
$ftp_username =$_POST['username'];
$ftp_password =$_POST['password'];
$location = 'ftp://$ftp_username:$ftp_password@$ftp_server'
header('Location: $location');

$ftp_connect_id = ftp_connect($ftp_server);
$ftp_login = ftp_login($ftp_connect_id, $ftp_username, $ftp_password);
if (! $ftp_connect_id || ! $ftp_login)
{
echo "Unable to connect to ".$ftp_server;
exit;
} else {
echo "Connected to host "<p>";
}
ftp_close($ftp_connect_id);
?>

right now, when i check it, I log on the html page and go the the php page where all it says is "Connected to host."

I don't see the "ftp://username:password@domain.com" that I want to see.

View Replies !
Unable To Login And Post To A Site Via Curl
There is a social bookmarking site here: http:// onlywire.com that I'm
trying to login and post to via curl.

It's using ajax and I haven't been able to figure out how to post to
it so far.

This is actually the first time I've ever seen a page that I can't
post to with curl.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved