Programatically upload a page in D7
&lt;?php
//Create node
    $node = new StdClass();
    $node-&gt;type = 'game';
    $node-&gt;title = t('@date-@time', array('@date' =&gt; format_date($om__result-&gt;date, 'short'), '@time' =&gt; format_date($om__result-&gt;time, 'custom', "h:i A")));

    //Date
    $node-&gt;field_date = array(
      0 =&gt; array(
        'value' =&gt; format_date($om__result-&gt;date, 'short'),
      ),
    );

    //Location
    $node-&gt;field_location = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;location,
      ),
    );


    //Home team
    $node-&gt;field_home = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;home,
      ),
    );

    //Visitor
    $node-&gt;field_away = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;visitor,
      ),
    );

    //Division
    $node-&gt;field_divsion = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;divisoin,
      ),
    );

    //Program
    $node-&gt;field_program = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;program,
      ),
    );

    //Time
    $node-&gt;field_time = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;time,
      ),
    );

    //Field
    $node-&gt;field_number = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;field_nuber,
      ),
    );

    node_submit($node);
    node_save($node);
    drupal_set_message(t('@node has been created', array('@node' =&gt; $node-&gt;title)));
?&gt;