Skip to content

Tag: random

PHP: How to play random mp4 videos in static url .php

I have a code in PHP language hosted in webcindario.com (free hosting), that shows on click a video randomly. But it works ONLY in VLC Player for Windows. The result is that the Chrome browser or Android don´t show the video: And I have these questions: Is there a way to get the code to work on Android device…

Shuffle() returns same results

I’m having a problem with using a basic shuffle() function in Laravel. It returns the same result, which seems to be changing once every 10 or 20 minutes. Here’s the basic code I’m testing: And here’s the log: Answer You probably initialize your random seed with a constant value somewh…

Generate save activation key as product key

I am trying to create a function which creates a random String. This String should consist of letters (only caps) and numbers. It will be used to activate a product. So the user has to type it into a text field. So far I found the following function: I do not have that much experience with random functions. S…