How to publish link programatically?
your problem is $new_node-&gt;status = 0;
This is setting the node to 'unpublished'.
either change the permissions to allow the users to see it or set $new_node-&gt;status = 1;
To create a link use the l() function eg. l('link text', 'node/'.$node-&gt;id);. http://api.drupal.org/api/drupal/includes!common.inc/function/l/7