Reply
How Do I Display Username & Password in URL
Old 01-27-2005, 06:12 PM How Do I Display Username & Password in URL
ghst_wulf's Avatar
Novice Talker

Posts: 14
Location: Seattle, WA
I need to display a username and password in a URL like so.. tom:wooley@127.0.0.1;stream.nsv

How do I do that after someone logs in. The reason I need this done is so that certain links on the website will attach the username and password to them so they can access those files. Does anyone know how to do this? And if so, can you help me? Thanks

J
ghst_wulf is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 01-27-2005, 07:24 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
That depends on how exactly they log in. It might be stored in a cookie, or in the $_SESSION[] array, or some other method. Which one are you using?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';
Scribble Pad MOD for phpBB (aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 01-27-2005, 09:21 PM
ghst_wulf's Avatar
Novice Talker

Posts: 14
Location: Seattle, WA
I need to call the username and password from the .htaccess login.

I have the page working to the point of resolving correctly. The username and password fields are blank, which would indicate that I am calling the information from the wrong place. The code I am using follows...

Code:
<html>
<head>
<?php

if (!isset($_COOKIE['cookie_info']))
{
echo $_COOKIE['cookie_info'];

?>

</head>


<body>

<center><OBJECT CLASSID="clsid:C5E28B9D-0A68-4B50-94E9-E8F6B4697516" WIDTH=480 HEIGHT=360 BORDER=0 codebase="http://www.nullsoft.com/nsv/embed/nsvplayx_vp6_mp3.cab#Version=-1,-1,-1,-1" id="nsvplayx">
<?php }

$cookie_info = explode("-", $_COOKIE['cookie_info']);

$username = $cookie_info[name];
$password = $cookie_info[password];

echo "<PARAM NAME='Location' VALUE='http://", $username, ":", $password, "@0.0.0.0:0000;stream.nsv'>";

?>
</OBJECT>

</body>
</html>
ghst_wulf is offline
Reply With Quote
View Public Profile
 
Old 01-30-2005, 02:22 AM
Logical Program's Avatar
Super Talker

Posts: 130
Location: Atlanta, Georgia
It'd be a lot easier to just begin a session, and output the desired information based on the registered session variables. I suggest you look into PHP Session at http://php.net. They come in handy for such things.
__________________
Logical Programming - For all of your website programming and design needs, make the logical choice. Logical Assistance For Real-World Clients.
Logical Program is offline
Reply With Quote
View Public Profile Visit Logical Program's homepage!
 
Reply     « Reply to How Do I Display Username & Password in URL
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11537 seconds with 13 queries