Getting the URL of a node in Drupal 7
You can use the url()
function:
$options = array('absolute' => TRUE);$nid = 1; // Node ID$url = url('node/' . $nid, $options);
That will give you the absolute path (i.e. with http://example.com/ in front of it), with the URL aliased path to the node page.