It depends on how the button works.
For instance, you can make an API. When the button is clicked, you can call the api via Ajax and save the IP during the process.
Or most likely you will write ip via action hook, if the button call the hook. In this case, you will use user agent.
Related Posts:
- Is it possible to store visitors IPs in wp_postmeta table?
- What is the difference between an ORM and an ODM?
- Rename a table in MySQL
- How should I tackle –secure-file-priv in MySQL?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Keeping WP database synced across multiple developers using git
- Staging sites, how do you manage synchronising updates in the DB?
- How to get the post publish date outside the loop?
- Using transients in conjunction with memcached
- How to define composite keys with dbDelta()
- Is it possible to define two databases for one installation?
- Forcing nickname as display_name in custom edit profile template
- Connect forms in WP to external database
- Hook into $wpdb
- How to get site URL if database is disconnected?
- Is it wise to delete post revisions and autosaves from database?
- Showing content from another wordpress installation database in the page template loop?
- Multiple WP install with same users database
- Dynamic data in `wp_register_script` needed
- Using two different DB users on one WP install
- Usage of Direct Database Call Without Caching Error
- Can I transfer a mysql database to another site?
- How to verify password outside WordPress?
- Weird issue with database migration and SSL links
- Merge two databases: OLD SITE -> NEW SITE
- Backup another database with BackUpWordPress plugin [closed]
- Easiest Way to Authenticate WP Users Using an External DB?
- How to use a different database to list and manage comments in the backend
- wpdb_prepare with multiple or condition
- Error establishing a database connection on Installation
- What is this in my tables
- Why is it that not all users have a ‘session_tokens’ meta_key record in the usermeta table?
- How do I find out the full path of a page’s template?
- I need to get an array from the wordpress database
- Use mulitple usernames?
- Routine to convert custom post meta from old to new value
- “The link you followed has expired” & “Error while saving” messages when adding new post
- input data and output table [closed]
- Trying to change database tables storage engine to innodb gives error “invalid default value for ‘post_date'”
- database connection [closed]
- sanitize POST arrays
- WP character encoding error after sharing post on Facebook �
- Sending data with multi step form to wp database
- Able to use all admin pages but in the frontend there is a “Error establishing a database connection”-Error
- WordPress query is not returning proper results
- Undefined Variable: mysqli error when connecting to database
- Localhost to Staging to Development Dynamic WP-CONFIG
- Selectively restoring original posts from a compromised site to a freshly installed WordPress database
- can we add extra table or column in wordpress for adding our data
- $wpdb is not initiating
- Duplicated site isn’t recognized as a site
- My options table is huge. What can I do?
- Changing root password in PHPMyAdmin for WordPress Database when going live
- How to properly check if a table exists in WordPress Database using Show Tables Query
- multiple wordpress installation with shared usertable on an different database
- wordpress database restore – broken link
- 6 random character prefix automatically added to entire DB tables, how / why? [closed]
- Insert Custom Data into wpusers
- Fill custom select field with pages/post titles
- Recovering the table wp_usermeta from users
- What unexpected data might be stored in terms table and related tables?
- No users table in WordPress’s database
- Copying blog from root to /folder (Not moving)
- How to restore an option_value with serialized data from backup data
- Replacing javascript link in WordPress database without getting mysql syntax errors
- How can i restore a WordPress site with the DB and WordPress Files
- User input to database
- What structure and database storage method should I use for temporary storage that may be written concurrently?
- how to access 2nd Mysqli Database from different server for wordpress
- Error establishing a database connection – WordPress setup, everything else is working
- Change user_nickname for author page link
- What is recommended data type and encryption type for password in a database
- Error establishing a database connection with XAMPP
- How to map data on CSV to web pages?
- Search and replace http:// to https:// 10x my database size
- Database size for news publishers?
- WordPress URL error for links
- Search and Replace in Windows XAMPP site
- How to get specific table by current user login
- After Migration From dev, Only my Links to the Homepage Still Redirect to dev
- Cloned site not connecting to database – MAMP
- do I need to change the default database prefix?
- WordPress Database Posts Table query
- How to use separate database on differrent server with different username and password in wordpress for users data
- Generating an HTML table from an array based on dynamic key values
- Split posts between databases
- How to write to wp-users table
- Theme options not being sent to Database
- What’s wrong with my $wpdb query?
- What is good W3 total database caching option? [closed]
- Why are my WordPress post queries so slow?
- Moving database from WP 2.6 to 3.5 problem
- How do I find posts?
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- Multi database link and mix and match email alert
- Homepage redirects to other site of mine? [closed]
- wp_usermeta key problem
- How to properly configure SSL connection to remote azure database for running queries within a WordPress environment
- Database Queries are crashing the server
- Uploading to WordPress Database