- Forums
- PHP
- How To Get PHP Session Id Code Sample To Show Obtain Display PHPSESSID
This Page Contains information about How To Get PHP Session Id Code Sample To Show Obtain Display PHPSESSID By webmaster in category PHP with 10 Replies. [978], Last Updated: Sat May 18, 2024
webmaster
Wed Nov 29, 2006
10 Comments
24217 Visits
A good admin always knows what's going on in his/her site. Once way to add security and flexability dynamically in PHP is with each visitor's unique PHP Session Id.
The only requirement for this to work on your web pages is that you have PHP in your hosting. IF you don't have php, you can signup with www.webune.com for a php plan. if you have php, continue on...
The function to show a user's phpsession id is : $PHPSESSID
I wrote this short script to show you how it works:
steps: copy and paste this code into your editor or a text editor(like notepad):
<?php
session_start();
?>
</HEAD>
<style type="text/css">
<!--
.style2 {color: #0066FF}
.style3 {
color: #009933;
font-weight: bold;
}
.style5 {color: #0066FF; font-weight: bold; }
-->
</style>
<BODY>
<strong>Displaying PHP SessionID by Tutorial Guide by Wallpaperama.com
</strong>
<h1 align="center" class="style2">Your PHPSESSID is: <?php echo session_id(); ?></h1>
<span class="style5">NOTE</span>: If you don't see a session id in tbe blue header above, hit <span class="style3">REFRESH</span> on your browser <br />
<br />
<div align="center">Turotial by <a href="http://www.wallpaperama.com">Wallpaperama.com</a></div>
<hr size="2" noshade>
<p>This Script was developed by <a href="http://www.wallpaperama.com">Wallpaperama.com</a> - Support us by telling your friends about wallpaperama and help contribut to the open source by adding your knowledge of PHP, Linux, Mysql and more to others, just like this script.</p>
<p>Thank You</p>
<p>Wallpaperama Team</p>
<p><a href="http://www.wallpaperama.com/forums/how-to-get-php-session-id-code-sample-to-show-obtain-display-phpsessid-t518.html"><< Go Back</a> </p>
<p align="center">PHP Hosting by <a href="http://www.webune.com">Webune.com</a> </p>
<p>
</BODY>
</HTML>
[ This post sponsered by www.webune.com ]
Save this file as wallpaperama-sessionid.php and uploaded to your Apache/ PHP server and open it with your browser (example: yourdomain.com/wallpaperama-sessionid.php), then it will display your own php sessionid as a demostration.
Thanks to our friends at www.webune.com, they have provide PHP hosting to show you a demo of how this script works:
CLICK HERE TO SEE DEMOI hope this helps. If you are starting with PHP, you're going to like PHP, it has so many great features impossible to list here.
Thanks
Wallpaperama Team
also the demo link doesnt work, its a dead url.
:(