I have a form here - http://example.com/palreg.php
As soon as people register, I will send them an email with a link that will allow them to edit their data (I know that this is a crazy way to do something, but I work on the code of another, so do not mind) for example url as such http://example.com/palreg.php?paliD=1234, and when they will go to this page, the form will be filled with their information so that they can make changes.
Now the problem is that the database is on another site, and the information must be passed to this site to perform the select action, for this I use cURL to send such information.
$url = "http://example2.com/processXML.php";
$xmlStr will be like this
<table>tab_name</table>
<action>select</action>
<palid>1234</palid>
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'xmlstr='.$xmlStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
(http://example2.com/processXML.php) xml , id .
, ( xml json array), .
return $dataArray; processXML.php ?
, , processXML.php
print json_encode($resultArray);
, , .