Related Content
Protecting A Page From Being Directly Accessed With PHP
I was thinking recently about the number of ways in which I could restrict access to a page using PHP.
The obvious option is to create a user authentication system, but in some situations that is overkill for what is required. If you just want to prevent users from going directly to a certain page then there are a few options open to you.
Generating Colour Palettes From Images In PHP
A common web design pattern is to incorporate an image into the design of the page. This creates a tighter integration with the image and the rest of the page.
The main issue in designing a page around the image is that the colours of the page must match the image. Otherwise this creates a dissonance between the image and the styles of the site.
Validating XML Files With XML Schema Definitions In PHP
XML is a useful format for configuration, data storage, and transmitting data from one system to another. As a human readable format that can be easily read by machines it quickly gained favor in lots of different systems as a mechanism for data storage.
Creating A Character Bitmap In PHP
I was watching a video from NDC by Dylan Beattie the other day on The Story of Typography and a particular section stood out to me.
Approximating Pi Using A Circle And A Square
Pi day was a few weeks ago, but I came across this simple approximation of pi recently and decided to put together an example in PHP since it seemed pretty simple.
This approximation of pi centers around a real world example, but we can simulate this using some code.
Drawing A Parabolic Curve With Straight Lines In PHP
A parabolic curve is a type of curve where every point is an equal distance from a focal point. There a number of different way to generate this sort of curve using math, but one of the simplest is to use straight lines to create the illusion of the curve.
Comments
Submitted by Rix on Tue, 02/16/2010 - 15:46
PermalinkSubmitted by philipnorton42 on Tue, 02/16/2010 - 15:51
PermalinkSubmitted by Rix on Tue, 02/16/2010 - 16:04
PermalinkSubmitted by philipnorton42 on Tue, 02/16/2010 - 16:18
PermalinkSubmitted by Rix on Tue, 02/16/2010 - 16:33
PermalinkSubmitted by Anonymous on Thu, 09/30/2010 - 21:25
PermalinkSubmitted by muthuraj on Fri, 11/19/2010 - 05:36
PermalinkSubmitted by Bernhard Zürn on Sat, 03/30/2013 - 12:12
PermalinkSubmitted by Francisco on Thu, 05/30/2013 - 20:53
PermalinkSubmitted by Jason on Wed, 07/03/2013 - 18:14
PermalinkSubmitted by Mark on Thu, 09/04/2014 - 20:20
PermalinkSubmitted by Sourav Basak on Fri, 01/09/2015 - 12:57
PermalinkSubmitted by Anonymous on Mon, 07/03/2017 - 08:43
PermalinkSubmitted by M S Labba on Wed, 07/05/2017 - 12:45
PermalinkPeculiar article, just what I was looking for.
Submitted by janacleary82125 on Wed, 06/20/2018 - 06:23
PermalinkI like this internet site because so much useful material on here :D.
Submitted by rufusvogt01061390631 on Wed, 07/11/2018 - 09:53
PermalinkHi Philipnorton42,
I am trying to use your authentication code on my website (into WPCODE Snippets Plugin), but I cant able to login and the login form is shown.
Could you help me to solve please?
Best regards,
Nicola
Submitted by Nicola on Tue, 05/09/2023 - 08:49
PermalinkHi Nicola,
This code is to be used when you want to download a web page that is held behind an authentication layer. It isn't an authentication system in itself.
I hope that helps.
Phil
Submitted by philipnorton42 on Tue, 05/09/2023 - 08:55
PermalinkThis solution worked! thanks much.
Submitted by George Okinda on Thu, 10/31/2024 - 17:18
PermalinkAdd new comment