20 Complete scripts to download

PHP, PHP Scripts, Techniques, Tips, Web Design & Programming
I've assembled a superb small accumulation of scripts over the previous year or thereabouts, and have chosen as its approaching summer in the Uk (sorry winter in Australia!) to do a download heap of 20 different scripts where you can get the parcel in a single click gratis! In spite of the fact that gifts are likewise highly acknowledged. Look at the record underneath for all the portions of the bundle. This accumulation is dependent upon a mixture of diverse systems, from Css, Php jquery to Mysql. jQuery Drag & Drop Using jQuery PHP and MySQL a complete drag and drop script that updates the database. jQuery Delete Delete items using PHP jQuery using an AJAX request. PHP jQuery and MySQL Autosuggest A powerful autosuggest script that searches a MySQL…
Read More

PHP Language Detection

PHP Scripts, Tips
We are searching for a modest route to immediately distinguish a clients dialect utilizing Php and went over this fascinating scrap which does simply that. It utilizes the Php superglobal "Http_accept_language" which returns something like this for me "en-Us,en;q=0.8″. This is the substance dialect code of the header from the present solicitation, if there is one. The Php Code This code essentially discovers what dialect header is situated (if there is one) and redirects the client to the applicable subdomain. English talking clients get re-controlled to en.mysite.com and so forth. In the variable $site we're constructing an exhibit of every last one of dialects and subdomains backed. This implies that down the line in the event that you need to include more back for diverse dialects case in point German…
Read More

Creating Automatic MySQL Database backups

Databases, PHP Scripts
Each database ought to be went down and assuming that you're presently completing it physically you can stop on the grounds that there's a basic result utilizing Php. With this script you can either pass a particular table to reinforcement or decide to reinforcement the entire database. The most effective method to enable The most ideal route to utilize the script underneath is to duplicate the code and put it in an organizer called "database_backups" as appeared. At that point whenever you call the backup.php index it will make a database reinforcement which is archived on your server. I'd propose downloading these database reinforcements occasionally so you have a duplicate saved securely somewhere else incase you lose your hosting. Using CRON Cron is a time-based job scheduler which allows you…
Read More

Country drop down list with php function

Databases, PHP, PHP Scripts, Tutorials
I had a venture as of late that needed the client to select their nation from a drop down record and store the information in a database. It was such a long process setting up the Php switch proclamation that I supposed somebody may find it handy for an activity. The code underneath is a depiction of the switch proclamation I've setup. The download at the lowest part incorporates 238 nations and mainlands. You recently need to store the nation code in the database then call the capacity beneath to furnish a proportional payback name. Download full code from here
Read More

Google’s Weather API in PHP

PHP, PHP Scripts, Web Design & Programming
It might be a delightful small task to compose an excercise on the most proficient method to construct an essential yet capable climate provision for either portable units or the desktop. The requisition takes a set of Google climate Api encourages and settles on some straightforward choices dependent upon the yield. For instance we can propose the client takes an umbrella if downpour or storms are gauge, or if the temperature warrants the requirement for warm apparel. Essential however in any case suitable informative data. Code Lets have a snappy go through at what the undertaking comprises of. Firstly we utilize the simplexml_load_file() Php capacity to get the xml information for the given area. We then verify whether the present climate condition is in the Xml record. Provided that it…
Read More

Create an error page to handle all errors with PHP

PHP, PHP Scripts, Tutorials
Here's an exceptionally modest result for taking care of a mixed bag of Http mistakes like 404, 500.. and so on in one php index. All we have to do is make a cluster of lapse codes and match against them by getting the worldwide redirect status code utilizing Php. This implies that we can utilize one page the handle various blunders. The Code You'll have to overhaul your .htaccess document so when a mistake is recognized the server knows how to handle the solicitation. For our situation we're set to send all the recorded slips to our nonexclusive errors.php record. ErrorDocument 400 /errors.php ErrorDocument 403 /errors.php ErrorDocument 404 /errors.php ErrorDocument 405 /errors.php ErrorDocument 408 /errors.php ErrorDocument 500 /errors.php ErrorDocument 502 /errors.php ErrorDocument 504 /errors.php The PHP This is the…
Read More

Display Facebook likes / Shares PHP function

PHP, PHP Scripts, Techniques
The CodeBelow is a super simple function that retrieves a JSON feed of comments, likes and shares for any URL you provide. function facebook_shares($url){ $fql = "SELECT url, normalized_url, share_count, like_count, comment_count, "; $fql .= "total_count, commentsbox_count, comments_fbid, click_count FROM "; $fql .= "link_stat WHERE url = '".$url."'"; $apifql="https://api.facebook.com/method/fql.query?format=json&query=".urlencode($fql); $fb_json=file_get_contents($apifql); return json_decode($fb_json); } How to use $fb = facebook_shares('https://www.facebook.com/redbull'); // facebook share count echo $fb[0]->share_count; // facebook like count echo $fb[0]->like_count; // facebook comment count echo $fb[0]->comment_count;
Read More

Show Google Plus’s – PHP function

PHP, PHP Scripts, Techniques
To get prefers and impart information for a Url here's a capacity to get Google Plus' for any Url. The Code It’s worth pointing out you must have CURL enabled on your web server, I believe it’s enabled by default on PHP5 setups. Also the Key below Isn’t a unique API key you must leave the key as is to ensure the code works properly. function gplus_shares($url){ // G+ DATA $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p", "params":{"nolog":true,"id":"' . $url . '","source":"widget","userId":"@viewer","groupId":"@self"}, "jsonrpc":"2.0","key":"p","apiVersion":"v1"}]'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); $result = curl_exec ($ch); curl_close ($ch); return json_decode($result, true); } Example Usage $gplus = gplus_shares('https://facebook.com'); echo $gplus[0]['result']['metadata']['globalCounts']['count'];
Read More

Edit Table in Ajax

Ajax, PHP, PHP Scripts
This class might be utilized to alter information in the cells of a Html table utilizing Ajax to safeguard the adapted unit values without reloading the present page. It takes a bi-dimensional cluster as parameter to describe the substance of the units of the table to be altered. At that point it creates the table Html with the indispensible Javascript code to alter the unit substance. The client may alter the units by clicking on them. The unit is transformed into a content information so the client can modify the unit substance with the console. In the event that you are utilizing Advate then you can detail the sort of info you need returned: content, textarea, select, radio, and checkboxes. For the last three, you have the capacity to define…
Read More

AJAX Rating Counter

Ajax, PHP, PHP Scripts
This bundle might be utilized to actualize a star rating framework that uses Ajax to overhaul the normal rate without reloading the rate page after a client has voted. It can show the present normal rating between 1 to 10 utilizing star symbol pictures. Another rating submitted by a client is sent to the server utilizing an Ajax solicitation. The server gives back where its due rating normal and the star symbol pictures change to the new rating worth. Download file from here
Read More