Jump to content

PHP Script failing on new host?


Recommended Posts



Hopefully i can get some help on this.


Basically i have made a script that generates a pin. But since using a new webhost half of the script doesn't seem to work. Its only generating the first three parts:


header("Content-Type: application/force-download");
header("Content-Length: 28");

echo '0000001002' . date("Ymd") .("0011") .randomNumber(06);

function randomNumber($length) {
$str = '';
for ($i=0; $i < $length; $i++) {
	$str .= rand(0,9);

return $str;


The random 6 numbers do not seem to generate? Does anyone know why this new host is making the scripts random number generation fail?



Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.