<p>I have a https link that requires user login &amp; password. If I run it in FX like this:
<a href="https://usernameassword@www.example.com/link/sublink" rel="nofollow noreferrer">https://usernameassword@www.example.com/link/sublink</a></p>

<p>it will return the xml data as expected.</p>

<p>However, what i'm trying to do, is to automate this process.
I try to use <a href="http://php.net/manual/en/function.file-get-contents.php" rel="nofollow noreferrer">file_get_contents()</a> in PHP.</p>

<p>I even tried to use AJAX, but still doesn't work.</p>

<p>I tried to get the content (XML) either in Server or in the front-end (ajax), but both don't work.</p>

<p>Does anyone know what I need to go in order to get the content? Do I need to obtain the SSL certificate? </p>

<p>Solution in any ohter languages will be welcome too.</p>

There is no straightforward way to do that. You could use transactions to make sure that updates are resolved correctly (i.e. that you do not get partial updates) but you would probably lose the first set of changes as it will be overwritten by the second.
Two options you probably have are:
implement some locking mechanism on the application level (i.e. when someone start editing a record put some flag somewhere which would prevent another user from doing the same)
implement version control so each time someone writes to the database a
new
record is created. This way both sets of data will be in the database and you could have a logic in your application to merge them or select the one you like