Posts

Showing posts from August, 2014

Moving WordPress from one Location to Another Location

Whether you are moving WordPress to a new server or to a different location on your server, you don't need to reinstall. WordPress is flexible enough to handle all of these situations. Moving to a New Server If you are moving WordPress from one server to another, begin by backing up your WordPress directory, images, plugins, and other files on your site as well as the database. See WordPress Backups and Backing Up Your Database. Here is a simple guide to moving your WordPress site to a new server that describes the process. Keeping Your Domain Name and URLs Moving your domain without changing the Home and Site URLs of your WordPress site is very simple, and in most cases can be done by moving the files. If database and URL remain the same, you can move by just copying your files and database. If database name or user changes, edit wp-config.php to have the correct values. If you want to test before you switch, you must temporarily change "siteurl" and "

Move your Magento site from one hosting account to another

Image
Follow these steps to transfer Magento from one account to another: Step 1: Backup the Magento MySQL Database Step 2: Transfer all Magento Files Step 3: Adjust the Magento Configuration Step 4: Restore the Magento Database STEP 1 Backup the Magento MySQL Database On SiteGround servers you have phpMyAdmin included by default in cPanel for your account. In other cases you will have to use the same tool or a similar one that is capable of exporting your MySQL database. Detailed information on how to perform a MySQL backup can be found in our MySQL Tutorial. Alternatively, if you don’t have phpMyAdmin installed but you have shell access you can use the mysqldump tool. The syntax is as follows: mysqldump -h HOST -u USER -p DATABASENAME > FILENAME.sql where: HOST is the database server hostname or it can be omitted if you are running the MySQL server locally USER - a user with full privileges to the Magento database DATABASENAME - is the full name of the database whic

Sending HTML mail using PHP

Image
<?php // multiple recipients $emailto  = 'emailto@example.com'; // note: For Multi emailto user comm // subject $subject = 'Email Subject For the mail'; // message $message = ' <html> <head>   <title>Title of th email</title> </head> <body>   <p>Folling is the Details</p>   <table>     <tr>       <th>Some Name 1</th><th>Some Name 2</th>     </tr>     <tr>       <td>Some Value 1</td><td>Some Value 1</td>     </tr>     <tr>       <td>Some Value 1</td><td>Some Value 1</td>     </tr>     <tr>       <td>Some Value 1</td><td>Some Value 1</td>     </tr>   </table> </body> </html> '; // To send HTML mail, the Content-type header must be set $headers  = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Co

Getting success response for Posting XML Data from PHP & curl

I have done the following code for the solution: <?php $url = "http://posttestserver.com/post.php";  // test post server $file="file.xml"; if (file_exists($file)) { // check file existance $headers = array( 'Content-Type: text/xml', 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language: en-US,en;q=0.5', 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0', 'Pragma: no-cache', 'Connect: close' ); $xml = file_get_contents($file); $stream_options = array(        'http' => array(        'method'  => 'POST',        'header'  => implode("\r\n", $headers),        'content' => trim($xml)     ), ); echo "Context:".$context  = stream_context_create($stream_options);     //  sending options echo "Response:".$response = file_get_contents($ur

Posting XML Data from PHP & curl

Image
There is a frequent need to post xml data to a url. Below is shown an example which lets you post xml data using CURL. <?php $url = "http://www.some_domain.com"; $post_string = '<?xml version="1.0" encoding="UTF-8"?> <rootNode> <innerNode> </innerNode> </rootNode>'; $header = "POST HTTP/1.0 \r\n"; $header .= "Content-type: text/xml \r\n"; $header .= "Content-length: ".strlen($post_string)." \r\n"; $header .= "Content-transfer-encoding: text \r\n"; $header .= "Connection: close \r\n\r\n"; $header .= $post_string; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 4); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header); $data = curl_exec($ch); if(curl_errno($ch)) print curl_error($ch); else curl_close($c

Facebook is not working now 1st August 2014

Image
What happen to facebook today. Its not working since one and hour. We think the Facebook is updating their website. It can affect a lot, who are most dependent on facebook for entertainment. Most people like student, housewife and bachelor professional. Facebook can announce a PR tomorrow. We are waiting for the same.  

A Bachelor's (Web Developer) house story

I am a developer in a Web Development company. I usually start to wake up at 8 to 9 am, Yes correct I start to wake up, not wake uo. As I have not a proper time to sleep. As well I start to wake-up, I also start to sleep after 2 am and usually go to bed 2:30 am with laptop, for some work. But my sleep time is 3 to 4 am. After wake, I have to ready for the office with 3 of my roommate.