Search code examples
urlhttpsrequestserver-side

How to get Https URL content


I have a https link that requires user login & password. If I run it in FX like this: https://usernameassword@www.example.com/link/sublink

it will return the xml data as expected.

However, what i'm trying to do, is to automate this process. I try to use file_get_contents() in PHP.

I even tried to use AJAX, but still doesn't work.

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

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

Solution in any ohter languages will be welcome too.


Solution

  • Use libcurl via its Java bindings.