Display posts if specific country

Take a look at freegeoip.net. I used it like this with jquery, for example. $.get( “http://freegeoip.net/json/”, ‘jsonp’, function( data ) { country = data[‘country_code’]; if( country == ‘US’ ){ // show your content }; });

Check if a user already voted [closed]

Creating a table for such functionality in WordPress is not an efficient move. I would prefer to do this using follwoing approach. Create Custom post type for your voters info. For this you can try Generate WP post type generator. When ever user visits your site; save IP and rating in post meta using wp … Read more

Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?

Are you using the same internet connection on multiple devices? Perhaps your mobile is connected to the same wifi network. Visit http://icanhazip.com in your mobile to see its IP. As for browserstack perhaps they aren’t accepting the cookie so their IP doesn’t get recorded. You should record the timestamp as well so you can correlate … Read more

How to access my site using IP Address? [closed]

Open a Terminal or CMD and type ping www.jijojose.me then press Enter. The IP address listed it’s the server’s IP address. However You won’t be able to access you website this way (e.g. http://173.252.100.16) unless: You know the folder where it is located on the server, and your server has mod_userdir or similar extension enabled … Read more

Categories ip Tags

How to set ipv6 address as siteurl?

I think your problem here is the esc_url() function which is used to sanitize a lot of the URLs used in wp-core. If you have a look at the function definition in formatting.php you’ll see that the regex in line 2627 is filtering out [ and ]. But fortunately you can also see that in … Read more

Broken CSS after changing the site URL

If you have access to your mysql you can update the wp-options table. Before modification… $ mysql -u <db_user> –password=<db_pwd> -D <db_name> <<<“select * from wp_options where option_name in (‘siteurl’, ‘home’);” +———–+—————–+—————————————————————————————————+———-+ | option_id | option_name | option_value | autoload | +———–+—————–+—————————————————————————————————+———-+ | 1 | siteurl | http://172.17.0.2/wordpress | yes | | 2 | home … Read more

IP address character limit

You can filter ‘get_comment_author_IP’: add_filter( ‘get_comment_author_IP’, ‘wpse_77254_trim_comment_ip’ ); function wpse_77254_trim_comment_ip( $ip ) { return implode( ‘.’, array_slice(explode( ‘.’, $ip ), 2) ) . ‘…’; } Note this will fail with IPv6 addresses.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)