Friday, May 29, 2015

How to create JSON using data from MySQL database



How to create JSON using data from MySQL database


JSON (JavaScript Object Notation) is more preferred nowadays over XML as it’s lightweight, readable and easily manageable for exchanging data across various platforms.
we’ll see how JSON Data can be created from Employee table stored in MySQL database.

1. Create Employee table in MySQL database.



Create PHP file to read MySQL table and create JSON.get_json.php

DONE



*************************************************************************
 More Advance
If you want to create a API which Provide data on pass parameter then you can use following code:

The following code used in for parameter pass for geting data in json format

http://localhost/test_more_advance.php?no=10

 



Read more....

Thursday, May 28, 2015

Best plugin for WORDPRESS ( Part:1 )

Best plugin for a wordpress Site .

  • The list of some of the best WordPress Plugins out there. Check out this list of top WordPress plugins and find out which plugins you should be using to improve your Wordpress Site .





Recommanded for each WP site.

Akismet – best guard against comment spam for WordPress blog! 
 
BackUpWordPress – BackUpWordPress will back up your entire site including your database and all your files on a schedule that suits you. 
 
WordPress SEO by Yoast – Yoast’s all in one SEO solution for your WordPress blog: SEO titles, meta descriptions, XML sitemaps, breadcrumbs & much more.
 

Google XML Sitemaps – This plugin generates a XML-Sitemap compliant sitemap of your WordPress blog. This format is supported by Ask.com, Google, YAHOO and MSN Search. The SEO plugins listed above can also do the sitemap for you.
 

All In One WP Security & Firewall – The All In One WordPress Security and Firewall is the ultimate security plugin that will take your WordPress site’s security to a whole new level.
 
BulletProof Security – BulletProof security plugin offers website security protection against: XSS, RFI, CRLF, CSRF, Base64, Code Injection and SQL Injection. 
 
Google Analytics for WordPress – This plugin makes it simple to add Google Analytics with extra search engines and automatic clickout and download tracking to your WordPress blog. 
 
WordPress.com Stats – Tracks views, post/page views, referrers, and clicks. This plugin requires a WordPress.com API key to function. 

Simple Membership Plugin – The simple membership plugin lets you protect your posts and pages so only your members (free or paid) can view the protected content. 
 
WordPress eMember – WP eMember is a feature rich membership plugin that can turn your existing or new WordPress site into a powerful membership site. 
 
WordPress Simple Paypal Shopping Cart – is a very easy to use plugin that allows you to sell products or services online in one click from your WordPress blog. Very useful when you want to sell eBooks or digital products from various posts and pages and need a WordPress Shopping Cart solution. 
 
WP Easy Paypal Payment Accept – This is a very easy to use WordPress plugin to Accept donation or Paypal payment for a service or a product in one click. Handy when you are trying to put a customized payment widget on your site (you can add it to the sidebar or a page or a post of your blog).

WordPress eStore – This plugin provides a complete solution to sell products from your site. It is really good for selling digital products securely from your WordPress blog.

WordPress Donations Widget Plugin – The WordPress Donations Widget Plugin allows you to collect donation for a cause from your WordPress powered site.



Read more....

Wednesday, May 13, 2015

How to enable PHP short tags?

In php some time you face problem in

<? tag and <?php tag 

the both tag are used in php but sometime <? tag is not working so you get Errors

to solve this error you have to a small change in your php.ini file and you get solution .
   
Set

                            
 short_open_tag=On          
                            
 
in php.ini

And restart your Apache server.
 
 
Read more....

Saturday, May 9, 2015

.htaccess To Redirect URLs WWW

For SEO it is important to use a set standard of how you present your domain. The most popular approach is to use the sub-domain www. Many people don't know this but http://www.domain.com is the same as http://domain.com, you will be sent to the same page but they will have different URLs.

For SEO if a search engine saw http://www.domain.com it will crawl this page, check the content and index the content. Then later if it goes and crawls http://domain.com the search engines will see the same content but on different URLs and think it is duplicate content and therefore will penalize this domain in the search engine ranking.

.htaccess To Redirect URLs
To use htaccess to redirect URL just copy and paste the snippet below and replace example.com with your domain.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

Add www With HTTP/HTTPS

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Read more....

Friday, May 8, 2015

Install/update WordPress plugins without providing FTP access?

WordPress will only prompt you for your FTP connection information while trying to install plugins or a WordPress update if it cannot write to /wp-content directly.

Now, if for some reason you do not want to rely on the automatic check for which filesystem method to use, you can define a constant, 'FS_METHOD' in your wp-config.php file, that is either 'direct', 'ssh', 'ftpext' or 'ftpsockets' and it will use that method.

then add this to your wp-config.php file:


 define('FS_METHOD', 'direct');

Permissions explained here:
Read more....
Related Posts Plugin for WordPress, Blogger...