Jump to content

PHP Script failing on new host?


burgo855

Recommended Posts

Hi,

 

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:

<?php

header("Content-Type: application/force-download");
header("Content-Disposition:attachment;filename=pin");
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?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/264155-php-script-failing-on-new-host/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.