sqlite3_open() can't open a URL, it can only open a local file.
In order for sqlite3_open()
to do what you want, the following needs to be true:
- The sqlite3 library needs to have an HTTP client embedded in it (it doesn't).
- The server at the other end needs to run a service to accept HTTP requests and pass commands on to the requested database (I am not aware of anybody having made such a service).
It's possible that somebody has created the service in the second bullet point but, if they have, you'd need a different sqlite3 library that implements the same API but sends your requests to the server instead of reading and writing a local file.
If your use-case is compatible and there is a sqlite3 database at that URL, you could download it to a local file and then open it using the normal sqlite3 library. You would not be able to re-upload any changes you make, though.
ETA
Joakim Danielson is correct. Sqlite3 is intended to be embedded in end user applications, not as a client server database manager. It's worth reading the Appropriate Uses page where it says:
SQLite does not compete with client/server databases. SQLite competes with fopen()