Posts

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.

Keyboard Shortcuts

Save time by using keyboard shortcuts. Keyboard Shortcuts For Windows and Mac Keyboard shortcuts are often used in modern operating systems and computer software programs. Using keyboard shortcuts could save you a lot of time. Basic Shortcuts Description Windows Mac OS Edit menu Alt + E Ctrl + F2 + F File menu Alt + F Ctrl + F2 + E View menu Alt + V Ctrl + F2 + V Select all text Ctrl + A Cmd + A Copy text Ctrl + C Cmd + C Find text Ctrl + F Cmd + F Find and replace text Ctrl + H Cmd + F New Document Ctrl + N Cmd + N Open a file Ctrl + O Cmd + O Print options Ctrl + P Cmd + P Save file Ctrl + S Cmd + S Paste text Ctrl + V Cmd + V Cut text Ctrl + X Cmd + X Redo text Ctrl + Y Shift + Cmd + Z Undo text Ctrl + Z Cmd + Z Text Editing Description Windows Mac OS Cursor Movement Go to the right or to the beginning of next line break Right Arrow Right Arrow Go to the left or to the end of previous line break Left Arrow Left Arrow Go up one row Up Arrow Up

How to make Bootable usb pendrive using cmd ??

Image
Creating a  usb pendrive  using  command prompt  is not hard, it is one of the most common ways to create a bootable usb.       This method does not work  if your operating sistem is windows xp or windows 8 , you cannot select the primary partition in comand prompt.         You just need to follow these simple steps: First step  is to obtain the windows files from somewhere and save them to a folder in your pc. You can rip a windows dvd , or if you have the iso image file you can open it with magic disc or daemon tools or even winrar , and you need to copy the  whole content to a folder anywhere in your pc , you just need to make sure you know where it is located. Make sure your usb stick is inserted, go to start search  cmd  ,  right click  the  file and select run as administrator . The command prompt will appear, now you need to write the following comands: diskpart→list disk→select disk 1 (chose  the usb device, you will recognize it by its size)→ clean (this will erase t