Category: PHP
<!DOCTYPE html> <html> <body> <script> var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { // document.write(this.responseText+”<hr>”); var myObj = JSON.parse(this.responseText); for(var i = 0 ; i < myObj.score.length ; i++) { document.write(myObj.score[i].user_name + ” ” + myObj.score[i].total_score + “<br />”); } } }; xmlhttp.open(“GET”, “all-time-json.php”, true);
Often we like to add a stamp or watermark in our images so no one can easily copy the images from our website. Create a folder in www as “watermark” and create/upload three files. stamp.png (It can be with transapercy) picture.jpg (Any image JPG) index.php <?php // Load the stamp and the photo to apply
<?php $to = “somebody@example.com, somebodyelse@example.com”; $subject = “HTML email”; $message = ” <html> <head> <title>HTML email</title> </head> <body> <p>This email contains HTML Tags!</p> <table> <tr> <th>Firstname</th> <th>Lastname</th> </tr> <tr> <td>ABCD</td> <td>EFGH</td> </tr> </table> </body> </html> “; // Always set content-type when sending HTML email $headers = “MIME-Version: 1.0” . “\r\n”; $headers .= “Content-type:text/html;charset=UTF-8” . “\r\n”;
Posts navigation