ini_set('display_errors', '1'); session_start(); //$words =array(); //$temp= $_POST["param"]; //if(strpos($temp," ") !== false) $words = explode("~", $temp); // /////////////////////////////////////////////////////////////////////// echo "<!doctype html>"; echo '<html lang="ar">'; echo "<head>"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>'; echo "<title>Untitled Document</title>"; echo "</head>"; echo '<body>'; echo "Start"; $ww = GetwordInfo("مدرس مزار شبشب"); echo var_dump($ww); echo json_encode($ww); for ($i = 0; $i < count($ww["words"]); $i++) { echo $ww["words"][$i]["word"] . "<br>"; echo $ww["words"][$i]["status"] . "<br>"; echo $ww["words"][$i]["alternates"][0] . "<br>"; } echo "</body>"; echo "</html>"; function FoundInDic($word) { $sql = "SELECT COUNT(`ID`) FROM `oneword` WHERE `the_word`='" . $word . "'"; include "db_config.php"; $result = mysqli_query($con, $sql); $rr = false;
<?php header('Content-Type: text/html; charset=utf-8'); /// set the content charset to utf-8 for php error_reporting(E_ALL); ini_set('display_errors', '1'); session_start(); $phrase = $_REQUEST["phrase"]; $key = $_REQUEST["key"]; if (IsValidKey($key)) { $ww = GetwordInfo($phrase); echo json_encode($ww); } // /////////////////////////////////////////////////////////////////////// //echo "<!doctype html>"; //echo '<html lang="ar">'; //echo "<head>"; //echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>'; //echo "<title>Untitled Document</title>"; //echo "</head>"; //echo '<body>'; //echo "Start"; //$ww=GetwordInfo("مدرس مزار شبشب"); //echo var_dump($ww); //echo(json_encode($ww)); //for ($i=0;$i<count($ww["words"]);$i++) //{ // echo $ww["words"][$i]["word"]."<br>"; // echo $ww["words"][$i]["status"]."<br>"; // echo $ww["words"][$i]["alternates"][0]."<br>";