API
1 |
http://dev.minirplus.com/give-me-random/ |
this api is used random_compat to generate more secure random number.
How to Use
Get api
1 2 3 4 5 6 7 |
$handle = fopen("http://dev.minirplus.com/give-me-random/","rb"); $content = ""; while (!feof($handle)) { $content .= fread($handle, 10000); } fclose($handle); $content = json_decode($content); |
Random Number
int_6 is the random number
1 |
echo $content->int_6; |
Random Color
rgb_color is the random color use rgb str
1 |
echo '<div style="width:100px;height:50px; background-color: '.$content->rgb_color.';"></div>'; |
There are no comments yet