Posts

Code for get data facebook likes category wise as a music

Note :- Use the facebook login and get token. <?php $token = $facebook->getAccessToken(); $_SESSION['token'] = $token; ?> -------------------------------------------------------- <?php ################################ List of Music ######################################### if(isset($_REQUEST['category_id']) && $_REQUEST['category_id'] == '2') { /*----------------------------------------------------- Fb Music Acess----------------------------------------------------------------*/ ################## User's Friends like ################################ $params['access_token'] = $_SESSION['token']; if(!isset($_SESSION['fb_likes_music'])) { $graph_url = "https://graph.facebook.com/me/friends?access_token=". $params['access_token']; $friends = json_decode(file_get_contents($graph_url)); $fb_friend=array();  $j=0;  $fb_likes_music=array(); foreach($friends->

how to show loader image before loading ajax

<html> <body> <script language="javascript">function loaddata(){ datastring = 'favour='+id+'&itemsId='+chkItem;                         jQuery.ajax({                         type: "POST",                           url: "cuponcode.php",                           data: datastring,                            beforeSend:function(){                         jQuery('#overlay_loader').css("display","block");                          },                         success: function(data){                          jQuery('#overlay_loader').css("display","none");                         alert('Your coupon code is created successfully for selected items');                         // jQuery("#fav_itm").html(data);                         },                             error:function(data){                             alert(data);                             }  

Disable right click script and Google Instant Map Search

<!DOCTYPE html created my solomon  > <html>     <head>         <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>         <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>         <title>Google Instant Map Search | spixup- demo </title>         <style type="text/css">             #map_canvas{                 height: 400px;                 width: 500px;                 margin: 5px auto;             }      </style>     </head>     <body> <SCRIPT TYPE="text/javascript"> //-------------Disable right click script ------------ //visit http://www.rainbow.arch.scriptmania.com/scripts/ var message="Sorry, right-click has been disabled"; /////////////////////////////////// function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElem

How to enable .htaccess in wamp server

Image
How to enable .htaccess in wamp server In this article,I will explain how  to enable  . htaccess  in wamp server. 1 .  Open wamp_server   (Go to  Wamp  -> Right click at icon in the taskbar=>  Apache =>  httpd.conf ) 2.Edit httpd.conf file. 3 . Just remove the # sign before the  LoadModule  rewrite_module modules/mod_rewrite.so  4 .  Save  the file .Mod Rewriting is enabled. 5.Restart the Server (Go to  Wamp  -> Right click at icon in the taskbar=>  Restart All services ) 6 . Now Create new file. Copy and paste the following code in it. Options +FollowSymLinks RewriteEngine On 7 .Save it as  .htaccess  in the root directory. 8 .Done. We have successfully enabled .htaccess in Wamp server.

Web Scraping Amazon with PHP

This snippet of PHP code demonstrates web scraping. It reads a sample page from Amazon.com, compares the HTML text against certain class name and outputs that matched text in an RSS feed.  <?php  $now   = date("D, d M Y H:i:s T"); $ASIN  = $url = $img = $title = $bio = $name = ""; $head = '<?xml version="1.0" encoding="ISO-8859-1"?>'; $head .= '<rss version="2.0">'; $head .= '<channel>'; $head .= '<title>Amazon </title>'; $head .= '<link>http://www.amazon.com</link>'; $head .= '<description>Amazon RSS Feed</description>'; $url = "http://www.amazon.com/Best-Sellers-Kindle-Store/zgbs/digital-text/"; $text = file_get_html($url); foreach ($text->find("div.zg_item_compact") as $class) {   foreach ($class->find('strong.price') as $price) {     if ($price->plaintext == "Free"

jQuery dynamic number ticker

This is a fascinating little script that helps you display a dynamic JSON feed of numbers that automatically updates on the page by animating up or down to the current number. A great addition as part of a realtime analytical dashboard. read more Click Here

jQuery Spectragram – An Instagram API jQuery plugin

Spectragram.js  is a jQuery plugin using the Instagram API to fetch and display user, popular or tags photo feeds inside a list or any container you define and display the results as list items or any other HTML tag you define. You can also define the size of the pictures (small, medium, large). Read More Click Here