Get database info from a website

Hy, I have a few websites, which i made in Wordpress and are on my own
servers. There i saved informations from users (they input their info in
a contact form). The form plugin is called Contact form 7 and saved all
the info on my servers.
Is it possible to write a ruby program, which would download all the
info from the databases and even maybe let me change info?

It is.

Ok, I thought so… And how does one start with thinking about how to do
that?

Well i do not know actuall what you mean by if i have permision to
connect to the database? I mean, i own the site, i have all the
passwords, so i do not understand, how i could not have permission?

Tadej Bogataj wrote in post #1182790:

Is it possible to write a ruby program, which would download all the
info from the databases and even maybe let me change info?

So, basically, you have a database on a different host, and want to read
its content, right?

To this extent, I don’t see whether it is important that it is a
database for the website or not.

The more important question is: Have you permissions to connect to this
database from your host to the host whether the database is running? If
yes, it is just “accessing the database”, which is trivial from Ruby
(databases run generally on a different host).

If not, because you are not authorized to do so, there are several
possibiities (SOAP for instance), but in any case, you would need to
write a server program, which runs on the webserver.

Great! That is exactly what i wanted to know. My possibilities and an
explenation how to do it. Thank you very much!

I was not aware that you really hosted the site. For example, some
people just get a low-cost hosting package from some service provider,
and while this includes a database, you can’t connect to it from the
outside.

But in your case, things are easier. There are several options. For
example, there exists Ruby packages taylored to special brands of
databases (you didn’t say which DB is running). Another option is to use
JRuby and JDBC or Ruby and ODBC
(ruby-odbc | RubyGems.org | your community gem host).

If you already have a database command line client and the database
access logic is simple (as it seems to be in your case), you could also
write the script for downloading the data in this client and call it
from your Ruby application.

As you see, there are many possibilities, and it is difficult to
recommend one, if we don’t know your system environment.