Posts

Showing posts from 2013

How to create test account in moneybookers.com

If you want to test the Moneybookers integration without using your real money then you will need to create 2 test accounts. Unfortunately Moneybookers doesn't have a "sandbox" account like PayPal or Authorize.Net, so this process is a little trickier. Sign up for a Moneybookers "Business account". Do not use the same email you'll be using for your real account. Sign up for a Moneybookers "Personal account". Use a different email than the "Business account". Do not use the same email you'll be using for your real account. Contact Moneybookers and ask them to convert these 2 accounts to test accounts. It doesn't need to be a long email. Just something simple like: ----------------------------------------- We need you to turn 2 accounts to test accounts: "Buyer account": Email: buyer-email@domain.com Customer ID: <UR ID> "Merchant account": Email: merchant-email@domain.com Customer ID: <UR

How to take backup of MySQL Database

Using Site Backup & Restore     - Select "Site Backup & Restore" from the Files category, after logging into cPanel.     - Select "MySQL Database (Individual)" option.     - Select the desired archive date.     - Select the desired database.     - Click "Download file" option on the right, or from the interactive mouse-over menu. Using phpMyAdmin     - Login to your cPanel and click phpMyAdmin icon in Databases section.     - Select the database you wish to export the backup from the drop-down list.     - Click on the "Export" Tab.     - Click the "GO" button.

How to Clear Browser Cache

Internet Explorer 7 From the   Tools   menu, select   Internet Options… Choose the   General   tab Under   Browsing   history, click   Delete… Next to “Temporary Internet Files” , click   Delete files… Click   Close , and then click   OK   to exit Internet Explorer 8 From the   Safety   menu, click   Delete Browsing History… Check   Temporary Internet Files   and   History , and then click   Delete Firefox 3.0 From the   Tools   menu, select   Clear Private Data check   Cache   and click   Clear Private Data Now Firefox has a keyboard short-cut that will clear your browser cache, in addition to browsing history, cookies and authenticated session – a fantastic tool for the security-minded: CTRL +SHIFT + DEL Firefox 3.5 From the   Tools   menu, select   Clear Recent History… Choose the range of time for when you would like the cache cleared Click the   Details   button, and make sure only   Cache   is checked Click   Clear Now Firefox 3.5 uses the sam

How to flush your DNS.

This is help to resolve your DNS cache  - Click on start menu  - Write "CMD" in to RUN box. (windows 7-8 user can write into search box)   - In command promp write : ipconfig/flushdns  - Press enter  - You reached at your goal :)

Enabling or Disabling Windows automatic updates

Windows Vista, 7, and 8 users - Open the Control Panel. - Under System and Security click Turn automatic updating on or off. - In the Important updates (as shown below) click the down arrow and choose how you want Windows to download and - install updates. - Click Ok. ----------------------------------------- Windows XP users - Click Start, Settings, and Control Panel. - Open System - Click the Automatic Updates tab. - Check or Uncheck the option for Keep my computer up to date. - If you are enabling this feature by checking this box, select one of the three settings on how you wish to be notified for updates. We would recommend you select the second option, Download the updates automatically and notify me when they are ready to be installed. - Click Apply and Ok. --------------------------------------- Windows 2000 users - Click Start, Settings, and Control Panel. - Open Automatic Updates - Check or Uncheck the option for Keep my computer up to date. - If you a

FInd HD wallpapert here

http://amazing-hdquality-wallpapers.blogspot.in/

Display page load time in PHP

So in order to measure the page generation time add the following code to the beginning of your PHP code - <?php $start_time_page = microtime(TRUE); ?> At the end of your PHP code add the following script - <?php $$end_time_page = microtime(TRUE); $time_taken = $end_time_page - $start_time_page; $time_taken = round($time_taken,3); echo 'Page generated in '.$time_taken.' seconds.'; ?>

How to add favicon into your website

1) Create/Convert your image file with .ico extention. 2) File name should be "favicon". 3) upload "favicon.ico" file into your root derectory of website. Note:- It will take 2-3 hour(depend on server) to reflect on website.

How to remote log out from Gmail, Facebook

If you headed home from office, without logging out of Facebook or Gmail, you can do so from anywhere using the 'remote log out' feature. In Facebook, click on the tiny gear sign on the top right of the page, go to 'account settings' and then to 'security' on the left pane. Under 'security settings', click on 'active sessions'. No one else might be using your account, but you would not have logged out of Facebook, leaving the session active. Anyone can gain access to your account in such circumstances. To remote log out, click on 'end activity'. In Gmail, at the bottom right side of the page, you will see details of your latest email access. If someone else is simultaneously using your account, you will see a notification there. Click on the 'Details' link below it. A new window opens, with a notification on whether the account is simultaneously open elsewhere. Like in the case of FB, you might not have logged out of the account,

How to remove compatibility view in IE

just write simple code in Head tab < meta http-equiv = "X-UA-Compatible" content = "IE=9; IE=8; IE=7; IE=EDGE" />

How to Display "logged in" user information in wordpress

<?php global $current_user; get_currentuserinfo(); echo 'Username: ' . $current_user->user_login . "\n"; echo 'User email: ' . $current_user->user_email . "\n"; echo 'User first name: ' . $current_user->user_firstname . "\n"; echo 'User last name: ' . $current_user->user_lastname . "\n"; echo 'User display name: ' . $current_user->display_name . "\n"; echo 'User ID: ' . $current_user->ID . "\n"; ?>     Login/Log out and redirect on same page    <?php echo wp_logout_url( get_permalink() ); ?>   <?php echo wp_login_url( get_permalink() ); ?>    

HTML Useful Character Entities

Result Description Entity Name Entity Number   non-breaking space &nbsp; &#160; < less than &lt; &#60; > greater than &gt; &#62; & ampersand &amp; &#38; ¢ cent &cent; &#162; £ pound &pound; &#163; ¥ yen &yen; &#165; € euro &euro; &#8364; § section &sect; &#167; © copyright &copy; &#169; ® registered trademark &reg; &#174; ™ trademark &trade; &#8482;

Send mail with attachment

?php function mail_attachment($filename, $path, $mailto, $from_mail, $from_name, $replyto, $subject, $message) { $file = $path.$filename; $file_size = filesize($file); $handle = fopen($file, "r"); $content = fread($handle, $file_size); fclose($handle); $content = chunk_split(base64_encode($content)); $uid = md5(uniqid(time())); $name = basename($file); $header = "From: ".$from_name." <".$from_mail.">\r\n"; $header .= "Reply-To: ".$replyto."\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-type:text/plain; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $head

Create Directory in PHP

if (! is_dir ( 'path/to/directory' )) { mkdir ( 'path/to/directory' ); }

Generate CSV file in PHP

<?php     function query_to_csv ( $db_conn , $query , $filename , $attachment = false , $headers = true ) {                 if( $attachment ) {             // send response headers to the browser             header ( 'Content-Type: text/csv' );             header ( 'Content-Disposition: attachment;filename=' . $filename );             $fp = fopen ( 'php://output' , 'w' );         } else {             $fp = fopen ( $filename , 'w' );         }                 $result = mysql_query ( $query , $db_conn ) or die( mysql_error ( $db_conn ) );                 if( $headers ) {             // output header row (if at least one row exists)             $row = mysql_fetch_assoc ( $result );             if( $row ) {                 fputcsv ( $fp , array_keys ( $row ));                 // reset pointer back to beginning                 mysql_data_seek ( $result , 0 );             }         }                 while( $row = mysql_fetch

3 Ways To Import Data Into Microsoft Dynamics GP – Integration Manager, eConnect & Web Services

A powerful capability of Microsoft Dynamics GP is the ability to integrate data from other sources into GP.   Microsoft offers a couple technology solutions; some ISVs have leveraged those to provide tools with more sophisticated front-ends.   Microsoft tools for importing data into GP include: the Integration Manager, eConnect, and Web Services.  The Integration Manager (IM) is offered as a separate application from GP and is used to import data into GP. IM is a graphical application and is designed to be easy to use. Programming skills are not required to define data integrations.  IM might be considered a “power user” tool (specifically when designing and mapping integrations), although any user can run integrations that have been defined.  eConnect is a set of files, tools, and services that allow applications to integrate with Microsoft Dynamics GP data.  eConnect contains a special set of SQL stored procedures that are installed in each GP company database.  Th

How to create webservice ?

URL to call webservice:   http://mydomain.com/web-service.php?user=2&num=10   -------------------------------------------------------   Sample code : /* require the user as the parameter */ if ( isset ( $_GET [ 'user' ] ) && intval ( $_GET [ 'user' ] ) ) { /* soak in the passed variable or set our own */ $number_of_posts = isset ( $_GET [ 'num' ] ) ? intval ( $_GET [ 'num' ] ) : 10 ; //10 is the default $format = strtolower ( $_GET [ 'format' ] ) == 'json' ? 'json' : 'xml' ; //xml is the default $user_id = intval ( $_GET [ 'user' ] ) ; //no default /* connect to the db */ $link = mysql_connect ( 'localhost' , 'username' , 'password' ) or die ( 'Cannot connect to the DB' ) ; mysql_select_db ( 'db_name' , $link ) or die ( 'Cannot select the DB' ) ; /* grab the posts from the db */ $query = "SELECT

How to Add Cron Job in Hostmonster

Recently I had to create a cron job on a HostMonster server to run a PHP script every X minutes. If you’ve ever searched for a tutorial on how to do this, you’ll know it’s no easy thing to find. After fumbling around and failing for a while, I finally managed to work the kinks out of the job. For those interested, the method I used was: */15 * * * * /ramdisk/bin/php5 /home/—hostmonster username here—/public_html/path/to/script.php The asterisks designate time frequency of the job, in the following order: minute (0-59), hour (0-23), day (1-31), month (1-12 or jan, feb, mar, etc), weekday (0-6 where Sunday is 0 or 7 OR sun, mon, tue, etc). So mine means ‘run once every fifteen minutes’. The ‘*’ means every. If you wanted to run once an hour, it’d be ‘0 * * * *’ meaning ‘run at :00 of each new hour’. Because I want to run a PHP script, I called PHP through the shell with ‘/ramdisk/bin/php5′. Alternatively, I could’ve used [and have succesfully] ‘php’ and ‘/usr/bin/php’, but HostMo