views:

430

answers:

4

Hi all

I have a https link that requires user login & password. If I run it in FX like this: https://[email protected]/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 fSocket in PHP

I even try Ajax, but still.. doesn't work.

and try 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.

+1  A: 

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.

hayalci
+1  A: 

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.

nsr81
A: 

How about in Java?

seatoskyhk
+1  A: 

Use libcurl via its Java bindings.

Adam Rosenfield