I have came up with a easy resolve using a simple form hidden on my website with the same info the users logged in with. Example If you want a user to be logged in on this form you can add something like this to the follow form below.
<input type="checkbox" name="autologin" id="autologin" />
as far I know i am the first to hide a form and submit it via clicking a link. There is the link submitting a hidden form with the information. Not 100% safe if you don't like auto login methods on your website with passwords sitting on a hidden form password text area......
Okay so here is the work. Lets say
$siteid is the account and
$sitepw is password.
First make the form in your php script if you dont like html in it use minimal data then echo in the value in a hidden form. I just use a php value and echo in anywhere i want pref next to the form button as you cant see it.
PHP Form to print
$hidden_forum = '
<form id="alt_forum_login" action="./forum/ucp.php?mode=login" method="post" style="display:none;">
<input type="text" name="username" id="username" value="'.strtolower($siteid).'" title="Username" />
<input type="password" name="password" id="password" value="'.$sitepw.'" title="Password" />
PHP and Link to submit form
<?php print $hidden_forum; ?>