Save URL into database

  1. If you have simple data, you can use add_option function to save the data to the wp_options database table. You can pass an array, it will be serialized automatically. Just pass the array to the function in the second argument, and specify the option name in the first argument (something like all_visits).

    And then you can retrieve it later using get_option function — just pass option name (in our case, all_visits) as the first argument. The value will be retrieved from the wp_options database table and unserialized automatically.

  2. If you want to save complex data, take a look at the wpdb class — it contains a set of functions used to interact with a database.