File: script_php.php

package info (click to toggle)
php-dompdf 0.6.1%2Bdfsg-2~bpo70%2B2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 4,200 kB
  • sloc: php: 19,599; makefile: 38; sh: 13
file content (28 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<title></title>
</head>

<body>

<?php
echo "<p>Here's some dynamically generated text and some random circles...</p>";
?>

<script type="text/php">
$max_x = $pdf->get_width() - 50;
$max_y = $pdf->get_height() - 50; 
for ( $i = 0; $i < 30; $i++) {
  $pdf->circle(rand(50, $max_x), rand(50, $max_y), rand(10, 70),
               array(rand()/getrandmax(), rand()/getrandmax(), rand()/getrandmax()),
               rand(1,40));
}
</script>
<?php
echo "<p>Current PHP version: " . phpversion() . ".  ";
echo "Today is " . strftime("%A") . " the " . strftime("%e").date("S").strftime(" of %B, %Y %T") . "</p>";

?>
</body> </html>