To show number of posts from a particular category, use the following code: <?php query_posts('cat=11&post_status=publish&posts_per_page=5,future'); if ( have_posts() ) : while ( have_posts() ) : //the_post(); echo '<div><a href="'.the_permalink().'">'.the_title().'</a></div>'; endwhile; endif; ?>
Author: Manish Soni
Keyboard shortcuts for browsing pages of lists
If you want to add keyboard shortcut (right and left arrow keys) to navigate between a list of pages then use javascript code below. // Keyboard shortcuts for browsing pages of lists $(document).keydown(handleKey); function handleKey(e){ var left_arrow = 37; var right_arrow = 39; if (e.target.localName == 'body' || e.target.localName == 'html'){ if (!e.ctrlKey && !e.altKey … Continue reading Keyboard shortcuts for browsing pages of lists
ERROR org.red5.server.service.Installer- resolved
ERROR org.red5.server.service.Installer - Unable to connect to http://red5.googlecode.com/svn/snapshots/
Importing Gmail Contacts Using CURL and PHP
The code to import your Gmail address book using PHP and curl is here. If you want to import the contacts to our site from Gmail. Please try given script: <?php $location = ""; $cookiearr = array(); $csv_source_encoding='utf-8'; #function get_contacts, accepts as arguments $login (the username) and $password #returns array of: array of the names … Continue reading Importing Gmail Contacts Using CURL and PHP
Update currency rates for your ecommerce website
public function updateExchangeRate(){ // Fetch currency rate if (time()-filemtime("eurofxref-daily.xml") > 36000) { $stuff = file("http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml"); $fh = fopen("eurofxref-daily.xml","w"); foreach ($stuff as $line) { fputs($fh,$line); } fclose ($fh); $xld = "loaded afresh (and not cached)"; } else { # .. or read from cache $stuff = file("eurofxref-daily.xml"); $xld = "cached (and not loaded afresh)"; } # … Continue reading Update currency rates for your ecommerce website
HSBC CPI Integration
Hey, I think that the HSBC CPI integration is difficult because the provider itself (HSBC) do not provides help or any documentation to integrate. I also worked a lot and searched google and many other sites to get help, and integrated the HSBC CPI successfully. After that i found that there are many developers having … Continue reading HSBC CPI Integration