| Server IP : 104.21.37.246 / Your IP : 104.23.243.33 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/kainumber.com/readinggeneral/ |
Upload File : |
<?php
$output=shell_exec('perl tell_P.pl '. $phonenumber);
//print $output2;
$output = strip_tags($output);
$arr_P = explode('------------------------------------------------------------------------------------------',$output);
///:: PASS 1
/*echo '<pre>';
print_r($arr_P['1']);
echo '</pre>';*/
$p1_sum = substr($arr_P['1'],63);
$p1_sum = substr($p1_sum,0,3);
$p1_sum_number = trim($p1_sum);//ผลรวมของเบอร์
/////////////////////////////////////////////////////////////////////////////
///:: PASS 2
/*echo '<pre>';
print_r($arr_P['2']);
echo '</pre>';*/
$arr_p2 = explode(':: For 2-digit --> Decoding combination in',$arr_P['2']);
$arr_p22 = explode('Identifying sequence:',$arr_p2['1']);
$arr_p23 = explode(':: For 3-digit --> Checking combination',$arr_p22['1']);
$p22 = $arr_p22[0];//ชุดเลช29ตัว
$p22_score = $arr_p23[0];//ชุดเลช29ตัว ที่จัดเรียงscore
$p23 = $arr_p23[1];//ชุดเลชสามตัว
//echo $p22.'<br>';
//echo $p22_score.'<br>';
//echo $p23.'<br>';
////score 2
$arr_p2_score = explode(':',$p22_score);
$i=0;
foreach ($arr_p2_score as $value)
{
$value_sub = substr($value,0,-2);
if($i > 0)
{
//$p2_score[$i]['list'] = substr($value,0,-2);
$p_score = explode('score = ',substr($value,0,-2));
//score
$score = substr($p_score['1'],0,4);
$score_p = explode('P',$score);
$p2_score[$i]['score'] = trim($score_p[0]);
//Pos
$p_Pos = explode('Pos = ',substr($value,0,-2));
$pos = substr($p_Pos['1'],0,2);
$p2_score[$i]['Pos'] = trim($pos);
//combination
$p_combination = explode('combination = ',substr($value,0,-2));
$combination = substr($p_combination['1'],0,2);
$p2_score[$i]['combination'] = trim($combination);
}
$i++;
}
/*
echo '<pre>';
print_r($p2_score);
echo '</pre>';
*/
////score 2
////score 3
$arr_p3 = explode('• At',$p23);
$i=0;
foreach ($arr_p3 as $value)
{
if($i > 0)
{
//echo $value.'<br>';
$p3 = explode(' --> ',$value);
//echo $p3[1].'<br>';
$arr_text3 = explode('[',$p3['1']);
$p3_score[$i]['list'] = trim($arr_text3[0]);
$arr_text3_2 = explode(']',$arr_text3[1]);
$p3_score[$i]['combination'] = trim($arr_text3_2[0]);
$arrp3_score = explode('score = ',$arr_text3_2[1]);
$p3_score[$i]['score'] = trim($arrp3_score[1]);
}
$i++;
}
/*echo '<pre>';
print_r($p3_score);
echo '</pre>';*/
////score 3
/////////////////////////////////////////////////////////////////////////////
///:: PASS 3
$arr_p3_1 = explode('...',$arr_P['3']);
$arr_p3_2 = explode(':: Total Score :',$arr_p3_1['1']);
$arr_p3_3 = explode(':: Sub-Cat Score :',$arr_p3_2['1']);
//echo $arr_p3_2[0].'<br>';//Score all
//echo 'Total Score ---> ' . $arr_p3_3[0].'<br>';//Total Score
//echo 'Sub-Cat Score ---> ' . $arr_p3_3[1].'<br>';//Sub-Cat Score
//echo $p23.'<br>';
$arr_P3_all = explode('//',$arr_p3_2[0]);
array_splice($arr_P3_all, -1);
$i=0;
foreach ($arr_P3_all as $value)
{
$arrP3_1 = explode(': (',$value);
$pass3_all_n[$i]['list'] = trim($arrP3_1[0]);
$arrP3_2 = explode(')',$arrP3_1[1]);
$pass3_all_n[$i]['score'] = trim($arrP3_2[0]);
$arrP3_3 = explode('|',$arrP3_2[1]);
$arrP3_4 = explode('description',$arrP3_3[0]);
//$pass3_all[$i]['description'] = trim($arrP3_4[1]);
$arrP3_5 = explode('of',$arrP3_4[1]);
if($arrP3_5[1])
{
$pass3_all_n[$i]['description'] = trim($arrP3_5[1]);
}
else
{
$pass3_all_n[$i]['description'] = trim($arrP3_4[1]);
}
$arrP3_6 = explode('friendship =',$arrP3_3[1]);
$arrP3_7 = explode('health =',$arrP3_6[1]);
$arrP3_8 = explode('love =',$arrP3_7[1]);
$arrP3_9 = explode('money =',$arrP3_8[1]);
$arrP3_10 = explode('parent =',$arrP3_9[1]);
$arrP3_11 = explode('safety =',$arrP3_10[1]);
$arrP3_12 = explode('support =',$arrP3_11[1]);
$arrP3_13 = explode('work =',$arrP3_12[1]);
$pass3_all_n[$i]['friendship'] = trim($arrP3_7[0]);
$pass3_all_n[$i]['health'] = trim($arrP3_8[0]);
$pass3_all_n[$i]['love'] = trim($arrP3_9[0]);
$pass3_all_n[$i]['money'] = trim($arrP3_10[0]);
$pass3_all_n[$i]['parent'] = trim($arrP3_11[0]);
$pass3_all_n[$i]['safety'] = trim($arrP3_12[0]);
$pass3_all_n[$i]['support'] = trim($arrP3_13[0]);
$pass3_all_n[$i]['work'] = trim($arrP3_13[1]);
$i++;
}
/*echo '<pre>';
print_r($pass3_all_n);
echo '</pre>';*/
$arr_p3_Score = explode(':',$arr_p3_3['0']);
$TotalScore_plus = $arr_p3_Score['0'];//คะแนนรวมฝั่งบวก
$TotalScore_delete = $arr_p3_Score['1'];//คะแนนรวมฝั่งลบ
$arr_p3_ScoreCat1 = explode('friendship =',$arr_p3_3[1]);
$arr_p3_ScoreCat2 = explode('health =',$arr_p3_ScoreCat1[1]);
$arr_p3_ScoreCat3 = explode('love =',$arr_p3_ScoreCat2[1]);
$arr_p3_ScoreCat4 = explode('money =',$arr_p3_ScoreCat3[1]);
$arr_p3_ScoreCat5 = explode('parent =',$arr_p3_ScoreCat4[1]);
$arr_p3_ScoreCat6 = explode('safety =',$arr_p3_ScoreCat5[1]);
$arr_p3_ScoreCat7 = explode('support =',$arr_p3_ScoreCat6[1]);
$arr_p3_ScoreCat8 = explode('work =',$arr_p3_ScoreCat7[1]);
$arr_p3_ScoreCat_1 = explode(':',$arr_p3_ScoreCat2[0]);
$arr_p3_ScoreCat_2 = explode(':',$arr_p3_ScoreCat3[0]);
$arr_p3_ScoreCat_3 = explode(':',$arr_p3_ScoreCat4[0]);
$arr_p3_ScoreCat_4 = explode(':',$arr_p3_ScoreCat5[0]);
$arr_p3_ScoreCat_5 = explode(':',$arr_p3_ScoreCat6[0]);
$arr_p3_ScoreCat_6 = explode(':',$arr_p3_ScoreCat7[0]);
$arr_p3_ScoreCat_7 = explode(':',$arr_p3_ScoreCat8[0]);
$arr_p3_ScoreCat_8 = explode(':',$arr_p3_ScoreCat8[01]);
$TotalScoreCat['friendship']['plus'] = trim($arr_p3_ScoreCat_1[0]);
$TotalScoreCat['friendship']['delete'] = trim($arr_p3_ScoreCat_1[1]);
$TotalScoreCat['health']['plus'] = trim($arr_p3_ScoreCat_2[0]);
$TotalScoreCat['health']['delete'] = trim($arr_p3_ScoreCat_2[1]);
$TotalScoreCat['love']['plus'] = trim($arr_p3_ScoreCat_3[0]);
$TotalScoreCat['love']['delete'] = trim($arr_p3_ScoreCat_3[1]);
$TotalScoreCat['money']['plus'] = trim($arr_p3_ScoreCat_4[0]);
$TotalScoreCat['money']['delete'] = trim($arr_p3_ScoreCat_4[1]);
$TotalScoreCat['parent']['plus'] = trim($arr_p3_ScoreCat_5[0]);
$TotalScoreCat['parent']['delete'] = trim($arr_p3_ScoreCat_5[1]);
$TotalScoreCat['safety']['plus'] = trim($arr_p3_ScoreCat_6[0]);
$TotalScoreCat['safety']['delete'] = trim($arr_p3_ScoreCat_6[1]);
$TotalScoreCat['support']['plus'] = trim($arr_p3_ScoreCat_7[0]);
$TotalScoreCat['support']['delete'] = trim($arr_p3_ScoreCat_7[1]);
$TotalScoreCat['work']['plus'] = trim($arr_p3_ScoreCat_8[0]);
$TotalScoreCat['work']['delete'] = trim($arr_p3_ScoreCat_8[1]);
/*echo '<pre>';
print_r($TotalScoreCat);
echo '</pre>';*/
/////////////////////////////////////////////////////////////////////////////
///:: PASS 4
$arr_p4_1 = explode('•',$arr_P[4]);
$arr_p4_2 = explode(':',$arr_p4_1[1]);
$arr_p4_3 = explode(')',trim($arr_p4_2[1]));
$arr_p4_4 = explode('(',trim($arr_p4_3[0]));
$arr_P4['list'] = trim($arr_p4_2[0]);
$arr_P4['score'] = trim($arr_p4_4[1]);
/*echo '<pre>';
print_r($arr_P4);
echo '</pre>';*/
?>