Related Content
A Look At Flood Fill Algorithms In PHP
If you have ever used a paint program then you might have used a flood fill algorithm. This is a mechanism by which an area of an image can be filled with a different colour and is normally depicted by a pain can pouring paint.
A Look At Benford's Law
Benford's Law is an interesting heuristic in data analysis. It states that in any large collection of numbers that are created naturally, you should expect to see numbers starting with the number 1 about 30% of the time. The frequency distribution of numbers states that 2 should appear about 17% of the time, down to 9 being seen just 5% of the time.
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.
DrupalCamp England 2025
The first DrupalCamp in England was held this weekend (1st March 2025) in Cambridge. I drove down on the Friday with Chris Maiden to attend (and speak!) at the event.
We arrived early at the event and and started the day with a much needed coffee (or two) and started chatting with the other attendees.
Drupal 11: Creating Custom Queues
Creating queues using the core queue classes in Drupal is fairly straightforward. You just need a mechanism of adding data to the queue and a worker to process that data.
Drupal 11: Using Data Transfer Objects With The Queue API
When writing data to the queue database system Drupal will convert the information to a string using the PHP serialize() function. When the information is pulled out of the database the queue system will unserialize() the data to convert it back into the original information.
Comments
Nice simple idea, done well. I have lots of @dataProvider tests in drupal 8.x and am having to expand/backport to 7.x. Your post gave me a good way to save time. Thanks
Submitted by Jonathan Smith on Mon, 09/14/2020 - 17:04
PermalinkYou are very welcome Jonathan. I'm really pleased that an article I wrote over 8 years ago is still helping people \o/
Submitted by philipnorton42 on Tue, 09/15/2020 - 15:31
PermalinkAdd new comment