tags:

views:

182

answers:

3

Almost the same question as this one here: http://stackoverflow.com/questions/825327/whats-the-easiest-way-to-grab-a-web-page-in-c

however the conditions have changed and I need to connect via https, this is a bit more tricky, anyone got any snippets?

I am on a qnx platform, building and compiling additional libraries and rolling it out onto our product is very, very hard given the contraints. So things like libcurl are not possible.

Results: It turns out I had to install libcurl on QNX after all. This involved installing perl and openSSL to build libcurl, but once that was built it was good to go. This was the least desirable option but it ended up being worth it.

+7  A: 

libcurl should be able to handle anything you need to do.

Volte
+1  A: 

If you're not able to use a library, then I guess you're either forced to cheat, as in "call out to a shell or some other environment that already has this capability". I'm not very familiar with QNX or the environments where it's typically run, not enough to dicount this possibility on my own anyway.

By the way, before skipping this: libcurl is known to build on QNX, so try that before even reading further.

Failing that, taking the question literally, I guess you need to implement the relevant parts of the HTTP protocol yourself. Since you now need secure access too, you're in a world of hurt. You just don't want to implement that type of code on your own, it is a lot of work, many many wheels to re-invent.

At the very least, I'd recommend taking a hard look around to see if any of the things you need to do this are already implemented. This page implies that OpenSSH is available for the QNX platform, which is encouraging.

unwind
A: 

I was away when you posted this followup question.

I've now posted an SSL-capable example program at http://pastebin.com/f1cd08b33

This needs to be linked against OpenSSL (-lssl) but doesn't need libcurl at all.

Alnitak