I am trying to save php output content as image.
Here is the example
http://p1.followland.com/namegenerator/imagen.php?1=95&2=47&3=32&4=88&5=50&name=OLIVIA&g=0
My code is long if there is another way please tell me. I would appriciate that
below is my code.
<?php
$v = (int)$_GET['v'];
$w = (int)$_GET['w'];
$x = (int)$_GET['x'];
$y = (int)$_GET['y'];
$z = (int)$_GET['z'];
$font_size_offset = 9.25; // you'll have to play with this, to get it just right.
// alter it based on the size of the font you use for #label.
?>
<style type="text/css">
body {
background-image: url('wo.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 0px 0px;
}
#fill_wrapper {
width: 17.7%;
position: fixed;
left: 208px;
top: 87px;
}
#fill_wrapper1 {
width: 17.7%;
position: fixed;
left: 208px;
top: 126px;
opacity: 0.7;
}
#fill_wrapper2 {
width: 17.7%;
position: fixed;
left: 208px;
top: 163px;
}
#fill_wrapper3 {
width: 17.7%;
position: fixed;
left: 209px;
top: 203px;
opacity: 1;
}
#fill_wrapper4 {
width: 17.7%;
position: fixed;
left: 208px;
top: 240px;
opacity: 0.7;
}
#label {
font-size: 32px;
padding-left: 50px;
color: black;
}
#fill {
width: <?php echo $v; ?>%;
height: 100%;
background-color: red;
}
#fill1 {
width: <?php echo $w; ?>%;
height: 30px;
border-style: solid;
border-color: green;
background-color: green;
}
#fill2 {
width: <?php echo $x; ?>%;
height: 40px;
border-style: solid;
border-color: yellow;
background-color: yellow;
}
#fill3 {
width: <?php echo $y; ?>%;
height: 100%;
background-color: orange;
}
#fill4 {
width: <?php echo $z; ?>%;
height: 100%;
background-color: violet;
}
</style>
<div id="fill_wrapper">
<?php if($v < 10) { echo '<span id="label">' . $v . '%</span>'; } ?>
<div id="fill">
<?php if($v >= 10) { echo '<span id="label">' . $v . '%</span>'; } ?>
</div>
<div id="fill_wrapper1">
<?php if($w < 10) { echo '<span id="label">' . $w . '%</span>'; } ?>
<div id="fill1">
<?php if($w >= 10) { echo '<span id="label">' . $w . '%</span>'; } ?>
</div>
<div id="fill_wrapper2">
<?php if($x < 10) { echo '<span id="label">' . $x . '%</span>'; } ?>
<div id="fill2">
<?php if($x >= 10) { echo '<span id="label">' . $x . '%</span>'; } ?>
</div>
<div id="fill_wrapper3">
<?php if($y < 10) { echo '<span id="label">' . $y . '%</span>'; } ?>
<div id="fill3">
<?php if($y >= 10) { echo '<span id="label">' . $y . '%</span>'; } ?>
</div>
<div id="fill_wrapper4">
<?php if($z < 10) { echo '<span id="label">' . $z . '%</span>'; } ?>
<div id="fill4">
<?php if($z >= 10) { echo '<span id="label">' . $z . '%</span>'; } ?>
</div>
</div>