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
? – Beebee Jun 21 '12 at 11:25drupal_http_request()
. Is there any reason why you cannot useurl('', array('absolute' => TRUE))
? Did you try it? – kiamlaluno♦ Jun 21 '12 at 12:37$url = url('page', array('absolute' => TRUE))
,$url
seems to behttp://default/page
. – arrubiu Jun 21 '12 at 12:51