Tuesday, 20 April 2021

PHP: EASY ECHO PHP INSIDE HTML echo HERE

 <?php

$muhaza = "muhaza";

echo<<<HERE

<h1>$muhaza</h1>

HERE;

?>


https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

PHP RANDOM ARRAY EXTERNAL FILE. MT_RAND()

 <?php

// You can do this, programmatically, using the following code ... Test It Yourself (TIY)

$colors=(file("random.txt"));//colors array


$c1=sizeof($colors)-1;//get position of the last element within the colors array


//    -- OR, if you prefer --

//$c1=count($colors)-1;//get position of the last element within the colors array


//pick a color at random from the colors array - 'Mersenne Twister based'

$color=$colors[mt_rand(0,$c1)];


echo<<<HERE

<!DOCTYPE html>

<html>

<head>

   <meta http-equiv="refresh" content="2">

</head>

<body>

   <div style="width:400px; background-color:$color; border:1px; text-align:center;" >

     $color

   </div>

</body>

</html>

HERE;

?>

Monday, 19 April 2021

PHP : RANDOM CONTACT DISPLAY NUMBER PHONE EXTERNAL FILE


<?php
    if(isset($_POST['submit'])){
$array = (file("https://website.com/wp-content/uploads/2021/04/random.txt"));
$a = $array;
$b=array("🎟️10%","🎟️20%","🎟️30%","🎟️40%","🎟️50%");
$random_keys=array_rand($a,4);
$random_keys=array_rand($b,2);
echo $a[$random_keys[0]]."<br>";
echo "Prize:";
echo $b[$random_keys[0]]."<br>";
 $a[$random_keys[1]]."<br>";
 $a[$random_keys[2]];
    } 
?>
<center>
         <form method="post">
             <input type="submit" name="submit" value="click">
         </form>
  </center>

email mailto: pretext

 <a href="mailto:designoutsourced.com+info@gmail.com?subject=Maklumat%20lanjut%20pakej&body=Hai,%20saya%20berminat%20tahu%20lebi...