title: Create .vcf file. [PHP]
body: <p>I access contacts from my mobile using <code>Cordova</code> then making that contact in string form like this.</p>
  <pre><code>BEGIN:VCARD
  VERSION:3.0
  FN:John Doe
  N:John Doe ;;;;
  TEL;TYPE=mobile:34458777452
  NOTE:
  NICKNAME:
  END:VCARD
  </code></pre>
  <p>after making string i send data in PHP to save vCard. in '*.vcf' form.
  But when i am open that file using <code>Nokia PC Suite</code> it show me like this figure below
  <img src="https://i.stack.imgur.com/NWVNg.png" alt="enter image description here" /></p>
  <p>Here is my sample code<br />
  First javascript part</p>
  <pre><code>$(function(){
          var vcfData = 'BEGIN:VCARD';
          vcfData += '\n';
          vcfData += 'VERSION:3.0';
          vcfData += '\n';
          vcfData += 'FN:John Doe';
          vcfData += '\n';
          vcfData += 'N:John Doe ;;;;';
          vcfData += '\n';
          vcfData += 'TEL;TYPE=mobile:34458777452';
          vcfData += '\n';
          vcfData += 'NOTE:';
          vcfData += '\n';
          vcfData += 'NICKNAME:';
          vcfData += '\n';
          vcfData += 'END:VCARD';
          console.log(vcfData);
          var params = {
              data:vcfData
          }
          var sUrl = 'test.php';
          $.ajax({
              url:sUrl,
              method:'POST',
              data:params,
              success:function(result){
                  console.log(result);
              }
          });
      });
  </code></pre>
  <p>and in php i made a file like this.</p>
  <pre><code>$data = $_POST['data'];
  $myfile = fopen('demo.vcf', &quot;w&quot;);
  fwrite($myfile, $data);
  fclose($myfile);
  </code></pre>
  <p><strong>Note</strong>
  I dont want to use any php classes for making vcf file (if possible)</p>