I'm writing a little module, and I need to call several pages of my site using drupal_http_request()
, which accepts only absolute URLs.
I don't want to add a variable to store the domain of the site, also because on my company we have proxy etc.
Which is the best way to add the domain of the site?
global $base_url
?drupal_http_request()
. Is there any reason why you cannot useurl('', array('absolute' => TRUE))
? Did you try it?$url = url('page', array('absolute' => TRUE))
,$url
seems to behttp://default/page
.