如何在图像上显示php变量输出

I have javascript

<script type="text/javascript">

var abc = document.createElement('script');
    var bhs_id = "yvw3lwc1tnvq670ybzprm8uhuhjrider";
    bhs.src = "//example.com/abc.php?site=" + bhs_id + "";    
    document.head.appendChild(bhs);
</script>

which add data to database, and i have made a simple php file which output online users corresponding to site id which is bhs_id which is different for different website in above script.

As the above script insert data into database. Besides i want to show online visitors that particular website on an image in the same way as on website whos.amung.us

Can somebody guide me. Thanks in advance.

It really need to be an image?

You could create an piece of html like:

<div class="counter-wrapper">
    <img src="your-counter-image.png">
    <span><!-- Print your counter value here --></span>
</div>

and style it using css:

div.counter-wrapper {
    position: relative;
}

div.counter-wrapper > span {
    position: absolute;
    top: 50%; // Adjust this values according to your image.
    left: 50%; // The value can be in %, px, cm, rem, etc.
}