how to access .inc file using jquery .get request

The jQuery Get method ($.get(URL)) loads data from the server by using the HTTP GET request. As mentioned in the $.ajax chapter, this is a short form of jQuery ajax method. The URL part is where a page or file name e.g. text file may be specified. $.get(Drupal.settings.basePath+’select_sub_cat?cat_id=’+cat_id+’&main_cat_id=1′, function(data) { […]

world.sql_.gz

— MySQL dump 10.13 Distrib 5.1.51, for pc-linux-gnu (i686) — — Host: 127.0.0.1 Database: world — —————————————————— — Server version 5.1.51-debug-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES latin1 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE=’+00:00′ */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 […]

how to set default timezone

The default time-zone used and displayed by PHP is UTC time (Coordinated Universal Time), and this is why PHP’s time is always several hours off from your local time. While it is usually best to leave the internal time-zone of PHP set on UTC (as it is a international time […]

how to Scrapp amazon products by NODE ID

Amazon uses a hierarchy of nodes to organize its various items. Each node represents a collection of items. Browse node IDs are positive integers that uniquely identify product collections. You can get a top seller list for a particular category or sub-category by passing a browsenode id for that particular […]

rss-feed-with images- using javascript

google.load("feeds", "1"); function initialize() { var feed = new google.feeds.Feed("http://www.starwoodhotels.com/dp/en_US/common/offers/rss_feed.jsp?searchType=COMMONSEARCH"); feed.setNumEntries(300); feed.load(function(result) { if (!result.error) { var container = document.getElementById("feed"); for (var i = 0; i < result.feed.entries.length; i++) { var entry = result.feed.entries[i]; $('#feed').append(''+entry.title+''); $('#feed').append(''+entry.publishedDate+''); $('#feed').append(''+entry.content+''); $('#feed').append(''); } } }); } google.setOnLoadCallback(initialize);

how to return last character from string

This function is short for Substring. You can grab a number of character from a string with substr. For example, suppose you wanted to check if an email address ended in .com. You could grab the last few characters and check them with an if statement. The syntax for substr( […]

how to resizing Iframe

You’ve spent countless hours designing and building the perfect responsive site. One problem — iframes. Proportionally resizing these pesky little windows to another world can be frustrating. It’s easy enough to make an iframe’s width span 100% of its container, but sizing its height is tricky — especially if the […]

how to get everything with regular expression

In regular expressions, the dot or period is one of the most commonly used metacharacters. Unfortunately, it is also the most commonly misused metacharacter. The dot matches a single character, without caring what that character is. The only exception are line break characters. In all regex flavors discussed in this […]

redirect without www to www

In order to redirect all of the requests for yourdomain.com to www.yourdomain.com, you should set the appropriate rewrite rule. This can be done by adding the following lines at the beginning of the .htaccess file in your public_html folder # adapt and uncomment the following: RewriteCond %{HTTP_HOST} ^oldforsale\.com$ [NC] RewriteRule […]