Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2004
Posts: 6
Junior Member
Junior Member
Offline
Joined: Dec 2004
Posts: 6
Ok I've parsed the post count.

Anyone got a plain php way to read the board cookie for user name without using any includes...just straight up read the cookie, grab the display name...etc. no noncgi paths, var_config includes...just straight up reading it and displaying it.

Basically the PHP equivalent of this:

Code
 <script language="Javascript1.1" type="text/javascript">
<!--

var session_cookie = getCookie('session2453335.1958');
if (session_cookie == null) {
var session_dt = "0";
var session_j = "0";
} else {
var session_array = session_cookie.split("&");
var session_dt = session_array[0];
var session_j = session_array[1];
}

function getCookie(name) {
var cname = name + "=";
var dc = document.cookie;

if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) {
end = dc.length;
} // end if
return (dc.substring(begin, end));
} // end if
} // end if
return null;
}

//-->
</script>

<script language="Javascript" type="text/javascript">
<!--
var user_cookie = getCookie('ubber2453335.1958');
if(''==user_cookie &#0124;&#0124; null==user_cookie) {
document.writeln('You are not logged in.' , ' <a class="top" href="http://www.poorreflection.com/cgi-bin/ultimatebb.cgi?ubb=login">Login</a> or <a class="top" href="http://www.poorreflection.com/cgi-bin/ultimatebb.cgi?ubb=agree">register</a>')
} else {

var user_array=user_cookie.split("&");
user_array[2] = unescape(user_array[2]);
document.writeln('Hello, ', user_array[2]);
document.writeln('[ <a class="top" href="http://www.poorreflection.com/cgi-bin/ultimatebb.cgi?ubb=logoff">'
,'<acronym title="Click here to log out.">'
,'log out</acronym></a> ]');

}
//-->
</script>

I've tried several ways and it keeps displaying nothing.

Thanks everyone - a lot of good posts in this forum - i think i've worn out the search button.

Sponsored Links
Entire Thread
Subject Posted By Posted
Storing and Reading Post Count to/from Cookies Rainman 12/08/2004 8:50 PM
Re: Storing and Reading Post Count to/from Cookies Charles Capps 12/08/2004 9:32 PM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/08/2004 11:32 PM
Re: Storing and Reading Post Count to/from Cookies Ron M 12/08/2004 11:58 PM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 12:34 AM
Re: Storing and Reading Post Count to/from Cookies Ian Spence 12/09/2004 12:46 AM
Re: Storing and Reading Post Count to/from Cookies Charles Capps 12/09/2004 1:19 AM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 2:27 AM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 11:46 AM
Re: Storing and Reading Post Count to/from Cookies Brett 12/09/2004 2:16 PM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 9:57 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)