cURL / Mailing Lists / curl-library / Single Mail

curl-library

[url open] open url in default browser?

From: Andre Krause <post_at_andre-krause.net>
Date: Sat, 27 May 2006 17:41:33 +0200

Hello!
i already used curl with good success on http POST some data for
highscore uploading in my game ( http://www.gravytris.de ).

does curl has a function to open a url in the systems default browser?

i have some code for win32:

#include <shellapi.h>
bool open_url(string url)
{
        // sdl version
        // > 32 means no error, <32 means some error happened
        return (int)ShellExecute(GetActiveWindow(), "open", url.c_str(), NULL,
NULL, SW_SHOW) > 32;
}

but i dont know how to do this on macos or linux etc.
is there a platform independent way to open a url in the default browser
? i'm using c++.

thanks alot for the great libcurl!
Received on 2006-05-27