We have a website that posts data to another website, once that data is send we include a php file. after the php file is included the var_dump doesn't give back the required information ("data received"). I thought it might have been curl at first but when I tried adding the data to a database it didn't do anything either. So by now I asume the code just doesn't continue. when I echo the 'received data' before the getData function it will display the echo if I add it behind the getData function it doesnt display.
Website1:
if(isset($_POST['password'])) {
$password = sha1($_POST['password']);
}
$post = [
$password,
];
$ch = curl_init("http://localhost/JoomlaToJoomlaPlugin/WebsiteOne/plugins/system/controlplugin/encrypted.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
}
Website2:
function __construct() {
$items = null;
if(isset($_POST)) {
$items = $_POST;
}
$this->pass = $items[0];
if(Encrypted::checkHash()) {
echo 'received data!';
Encrypted::getData();
echo 'THIS DOES NOT DISPLAY!!!!!!!!';
Encrypted::sendDatabackTest();
} else {
echo 'error';
}
}
private function getData() {
require_once(JPATH_BASE .DS.'libraries/cms/version/version.php');
echo JVersion::getShortVersion();