I have two websites (support.mahtt.host and phonezone.ir), and I want my test.php file in phonezone.ir reads prices from support.mahtt.host. As per WHMCS documentation, everything works fine but I want it works in another way. Please check this file: http://phonezone.ir/saeed/test.php It reads the name from http://phonezone.ir/saeed/name.php and the price from http://phonezone.ir/saeed/price.php, but as you see in its HTML codes, Javascript tag is shown that from which site the price and name are read.
I've started learning PHP recently and I don't know what to search for it exactly over the web. I have tried to work with file_get_contents() and curl() function, but I think I have tried the wrong ones.
name.php contents (php tags are omitted):
$name = "<script language='javascript' src='https://support.mahtt.host/feeds/productsinfo.php?pid=1&get=name'></script>";
price.php contents (php tags are omitted):
$price = "<script language='javascript' src='https://support.mahtt.host/feeds/productsinfo.php?pid=9&get=price&billingcycle=monthly'></script>";
test.php contents (php tags are omitted):
include ("./name.php");
include ("./price.php");
echo "The price of $name is $price.";
The current html output is:
The price of <script language='javascript' src='https://support.mahtt.host/feeds/productsinfo.php?pid=1&get=name'></script> is <script language='javascript' src='https://support.mahtt.host/feeds/productsinfo.php?pid=9&get=price&billingcycle=monthly'></script>.
I want HTML output be like as it's shown in the browser, like this:
The price of IRcPanel-A is 81,000 تومان.
And when I or any other visitor sees, we only see the above output in both browser and html output.
Could you please help me what should I do to get my expected result?