how to add data to custom content type using node with codeing
The proper method is 

  $body_text = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.';

  $node = new stdClass();
  $node-&gt;type = 'article';
  node_object_prepare($node);

  $node-&gt;title    = 'Node Created Programmatically on ' . date('c');
  $node-&gt;language = LANGUAGE_NONE;

  $node-&gt;body[$node-&gt;language][0]['value']   = $body_text;
  $node-&gt;body[$node-&gt;language][0]['summary'] = text_summary($body_text);
  $node-&gt;body[$node-&gt;language][0]['format']  = 'filtered_html';

  $path = 'content/my-lipsum-' . date('YmdHis');
  $node-&gt;path = array('alias' =&gt; $path);

  node_save($node);


To Add custom fields

// Let's add some CCK/Fields API field. This is pretty similar to the body example 
$node-&gt;field_custom_name[$node-&gt;language][0]['value'] = 'This is a custom field value';
// If your custom field has a format, don't forget to define it here
$node-&gt;field_custom_name[$node-&gt;language][0]['format'] = 'This is a custom field value';


How to programmatically create/manage node in drupal 7