| | Hello PHP Programmers! In this newsletter we take a look at how you can use random numbers in your PHP programs. We also look at the difference between cookies and sessions. Happy Holidays everyone! Have a great week! | | Random Numbers There are lots of different reason you may want to generate a random number. PHP can generate a random number over a very large range, or pick randomly between only two or three choices. You can set these parameters when you generate the number. | The Difference Between Cookies and Sessions The main difference between cookies and sessions is that cookies are stored in the user's browser, and sessions are not. This difference determines what each is best used for. | Finding the HTTP_REFERER The page referrer is found by using the $HTTP_REFERER variable. This is a quick way of looking up where people are navigating to your pages from. Once you know this information you can also filter users based upon it. For example, you only let people who come from one of your referring pages to use your downloads section, etc. | | | | | Related Searches | | | | Featured Articles | | | | | | Sign up for more free newsletters on your favorite topics | | | | You are receiving this newsletter because you subscribed to the About.com PHP / MySQL newsletter. If you wish to change your email address or unsubscribe, please click here. About.com respects your privacy: Our Privacy Policy Contact Information: 249 West 17th Street New York, NY, 10011 © 2012 About.com | | | | Must Reads | | | Follow me on: | | | | Advertisement | |
No comments:
Post a Comment