Posts

Showing posts from January, 2010

Privacy and Policy

Copyright © 2009 Ankit Kumar Chauhan Permission is hereby granted, free of charge, to any person obtaining a  copy of this script and associated documentation files (the "script"), to deal  in the Software without restriction, including without limitation the rights to  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of  the Software, and to permit persons to whom the Software is furnished to do so,  subject to the following conditions: The above copyright notice and this permission notice shall be included in  all copies or substantial portions of the Scripts. THE Script IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, O

pagination using jquery

Image
jPaginate is a jQuery pagination plugin that comes with a twist: animated page numbers. The user can slide through the available page numbers by clicking or just hovering over the arrows. Shortlinks to the first and last page are available as well. You can call the plugin in the following way:$(elementID).paginate() You can configure the plugin with the following properties: count : The total number of pages start : With which number the visible pages should start display : How many page numbers should be visible border : If there should be a border (true/false) border_color : Color of the border text_color : Color of the text/numbers background_color : Background color border_hover_color : Border color when hovering text_hover_color : Text color when hovering background_hover_color : Background color when hovering images : If the arrows should be images or not (true/false) mouse : With value “press” the user can keep the mouse button pressed and the page numbers will k

PayPal Website Payment Pro Script in php

Paypal Website Payments Pro is a new, easy way of accepting online credit card and paypal payments. It allows you to accept CC payments on your website without going through a gateway or setting up a merchant account. This script/module allows you to easily connect to the Paypal Pro servers and process credit cards. This script works with any PHP or HTML form! PayPal Pro Direct Payments & Express Checkout Script in PHP <?php define('API_USERNAME', 'Your_API_USERNAME'); define('API_PASSWORD', 'YourAPI_PASSWORD'); define('API_SIGNATURE', 'Your_API_SIGNATURE'); define('API_ENDPOINT', 'https://api-3t.paypal.com/nvp'); define('USE_PROXY',FALSE); define('PROXY_HOST', '127.0.0.1'); define('PROXY_PORT', '808'); define('PAYPAL_URL', 'https://www.paypal.com/webscr&cmd=_express-checkout&token='); define('VERSION', '53.0'); echo &quo

10 Ways to Increase Your Alexa Rank

Alexa.com provides information on traffic levels for websites. The Alexa rank is measured according to the amount of users who have visited your website, when you have the Alexa toolbar installed. According to Alexa, its traffic rankings are based on the usage patterns of Alexa Toolbar users and data collected from other, diverse sources over a rolling 3 month period. A site's ranking is based on a combined measure of reach and page views. Reach is determined by the number of unique Alexa users who visit a site on a given day. Page views are the total number of Alexa user URL requests for a site. However, multiple requests for the same URL on the same day by the same user are counted as a single page view. The site with the highest combination of users and page views is ranked #1. As a webmaster, if you depend on your site for monetization, your Alexa rank is one of the best means to determine the popularity of your website. Are you looking for means to boost your Al

SEARCH ENGINE OPTIMIZATION METHODS

  Secrets & Strategies on Blogging A blogger can increase blog traffic with the help of few strategies. If you like to increase traffic and rank of blog then you should keep few things always in your mind. Secrets and Strategies of Blogging 1.     Updated Content – You must write updated news articles for blogs. Your content should be having good English. Always remember content is king for blogging. 2.     Social Bookmarking – After writing one article, go for submitting your article into social media places. Remember always, that your title and description should not same. Write another description and title for bookmarkting. This is important strategies on blogging . 3.     Keyword Stuff – Your blog should not be having huge keywords. Your blog should be natural. After writing blog, suggest keyword for your post. You should imagine topic before writing then after writing, you should select tags. 4.     Internal Linking – You should give internal links to your i

Get country city Location from IP address

This is a sample in PHP of how you can integrate the answer in your application : function locateIp($ip){ $d = file_get_contents("http://www.ipinfodb.com/ip_query.php?ip=$ip&output=xml"); //Use backup server if cannot make a connection if (!$d){ $backup = file_get_contents("http://backup.ipinfodb.com/ip_query.php?ip=$ip&output=xml"); $answer = new SimpleXMLElement($backup); if (!$backup) return false; // Failed to open connection }else{ $answer = new SimpleXMLElement($d); } $country_code = $answer->CountryCode; $country_name = $answer->CountryName; $region_name = $answer->RegionName; $city = $answer->City; $zippostalcode = $answer->ZipPostalCode; $latitude = $answer->Latitude; $longitude = $answer->Longitude; $timezone = $answer->Timezone; $gmtoffset = $answer->Gmtoffset; $dstoffset = $answer->Dstoffset; //Return the data as

add twitter digg reddit orkut facebook stumbleupon button to blogspot

Image
Hi friends You can Add These buttons by following these steps: Login to your blogger account Go to Layout section and go Edit HTML tab Click on expand widget template template. Find  following code <div class='post-header-line-1'/> or Paste any one of the following codes below the if you want button to appear button below the post or above the   if you want button to appear above post.  Digg <script type='text/javascript'> digg_url="<data:post.url/>"; </script> <script src='http://digg.com/tools/diggthis.js' type='text/javascript'/> Tweet <script type='text/javascript'> tweetmeme_url = '<data:post.url/>'; </script> <script src='http://tweetmeme.com/i/scripts/button.js' type='text/javascript'/> reddit <script>reddit_url='<data:post.url/>'</script> <script>reddit_title='<data

contact me

Wish to contact me? Use the form below or simply drop in an email on my email address, ankitchauhan22@gmail.com * Required

search drop down list onmouseover event

Image
Hi friends Here you can see the code to get dropdown list onmouseover event using javascript <script type="text/javascript"> var timeout    = 100; var closetimer    = 0; var ddmenuitem    = 0; function mopen(id) {     // cancel close timer     mcancelclosetime();     // close old layer     if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';     // get new layer and show it     ddmenuitem = document.getElementById(id);     if(ddmenuitem)         ddmenuitem.style.visibility = 'visible'; } function mclose() {     if(ddmenuitem) ddmenuitem.style.visibility = 'hidden'; } function mclosetime() {     closetimer = window.setTimeout(mclose, timeout); } function mcancelclosetime() {     if(closetimer)     {         window.clearTimeout(closetimer);         closetimer = null;     } } function chooseSearchSelect(type) { } </script> <style type="text/css"> .clsMenuSearch { background-color:#

get searching data from google on localhost

Hi friends, Try this to get search data on your local host. <?php $text = $_POST['search']; ?> <form action="searchbygoogle.php" method="POST"> <input name="search" type="text" value="<?= $text;?>" /> <input type="submit" value="Search" /> </form> if ($_POST['search']==""){ echo "No search data found"; } else{ $query = file_get_contents("http://www.google.com/search?q=".urlencode($_POST['search'])."&hl=en&ie=UTF-8&filter=2"); //needs to be added with more queries $replace_array = array('/\n/','/(.*)<\/head>/','/(.*) /','/ (.*)/'); //pregraplacing unneeded parts $results = preg_replace($replace_array, '', $query); echo $results; } ?> </div>

export to excel in php

Image
Hi friends Excel files are great for many things. It might though be a little bit tricky to generate them on the fly with php. Therefor I will guide you exactly how to do it, quick and simple. Excel is a very useful format for lots of purposes. For example, exporting stats, member lists to hand over to economy department etc.   <?php echo "Export Data Using PHP"; echo ' <form action="'. $phpself.'"> '; echo '<input name="submit" type="submit" value="Export" /> </form> '; ?> } else { $dbc = mysql_connect("localhost","root",""); mysql_select_db("test",$dbc); $contents="ID,Title,Visit\n"; $user_query = mysql_query('select id,title,visit from wallpaper'); while($row = mysql_fetch_array($user_query)) { $contents.=$row[0].","; $contents.=$row[1].","; $contents.=$row[2]."\n"; }

get time difference in php

Image
Date and time is one function which is always like there in whatever website, project you create. The more simple they look like to start with the more complex they become. Complexity comes in when we put these functions into different loops conditions etc.  The line below show you how you can call function. The function expects to be given 2 strings representing the start and end values of a time or date. <?php echo 'Hi! My name is Ankit Kumar Chauhan. I am: '.getDifference(date("Y-m-d G:i:s"),'1985-10-02 00:00:00'). ' Years old.'; function getDifference($startDate,$endDate,$format = 6) {     list($date,$time) = explode(' ',$endDate);     $startdate = explode("-",$date);     $starttime = explode(":",$time);     list($date,$time) = explode(' ',$startDate);     $enddate = explode("-",$date);     $endtime = explode(":",$time);     $secondsDifference = mktime($endtime[0],$endtim