I'm trying to implement a simple login with Sharepoint on a PHP existing application. I have read many information (some related to Client side login -but only works for windows AFAIK-) and forums like this one  and with this approach I been able to login with the credentials of a user in a trial of Office365.
You can test it here
Login: cristianpark Password: crisPaRK01 Host: https://almeraim.sharepoint.com
It says 'login satisfactorio' (successful login) but if I try with some user from a registered sharepoint, I don't know how is the plan they have but they use emails like: email@example.com instead of firstname.lastname@example.org, with credentials like that, the script doesn't work, it shows some text on red. I'll try another things I have read but I want to know if you know if there is a better way of accomplish the login in a Linux box with PHP
Thanks in advance