View Full Version : PHP logs into multiple sites (new windows)

07-31-2007, 12:40 AM

I am making a portal which users log into. Everything is pointing to a DB, Tables are linked to other tables.



I am trying to set it up. where the User logins into the Portal, clicks on the link that states its EMail, or Ticket.

It will then look at the portal_users ID, to match to email_users ID, to pull the correct Users UN and PASS.


How can I make my portal log users into an external site, such as our OWA

07-31-2007, 01:13 AM
Look into using cURL (http://www.php.net/curl) Also, make sure whoever sites you are trying to log in via the portal allows it.

07-31-2007, 01:40 PM
I have setup a Way so far, I havent started using this method after logging into my portal yet,, but im just demoing IDs in the URL... so sessions will keep track of the data

@mysql_select_db($database) or die( "Unable to select database");
$query=" SELECT * FROM users WHERE email_id='$email_id'";
while ($i < $num) {


<FORM action="https://owa.atlarge.net/exchweb/bin/auth/owaauth.dll" method="POST" name="logonOWA" autocomplete="off" target="_blank">
<INPUT type="hidden" name="destination" value="https://owa.atlarge.net/">
<INPUT type="hidden" name="flags" value="0">
<TABLE align="center" border="1" height="100" width="400" bordercolor="#cc66ff">
<TABLE border="0" align="center" width="400" bordercolor="#cc66ff" height="150">
<TD colspan="2">
<P align="center"><U><FONT>Only use First initial Last name</FONT></U></P>
<TD align="right"><FONT>FLast:</FONT> </TD>
<INPUT type="text" id="username" name="username" size="25" maxlength="256" value="<?php echo $user_name; ?>"></TD>
<TD align="right"><FONT>Password:</FONT> </TD>
<INPUT type="password" autocomplete="off" id="password" name="password" size="25" maxlength="256" value="<?php echo $pass_word; ?>">
<TD colspan="2" align="center">
<INPUT type="submit" value="Check your eMail" id="SubmitCreds" name="SubmitCreds"></TD>

Now thats working, so, I already have my portal that can be logged into
So all im needing to figure out.

A way for, after you login, Portal_ID=# says in the URL always.
When you click link for. email, ticket, ftp, and so on.
Ill have it load the form, with hidden boxes, in a frame, then lunch the site in a new window.

Figuring out how to have my php look at the portal ID and say, 1 is 6 in email_id

08-02-2007, 09:17 PM
I have figured out a great way to make this work

if anyone needs anything similar please fill free to see me and PM or email