Question

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.

Was it helpful?

Solution

Use libcurl via its Java bindings.

OTHER TIPS

You should use curl library, also certificate should be verified if you want to prevent man-in-the-middle attacks. Or just ignore it using curl options.

cURL or wget with SSL support.

cURL, you can run either through the compiled PHP library or call the executable from PHP.

Wget, you will have to call the executable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top