Jump to content


Photo

How do I Insert A Var In A URL Function


  • Please log in to reply
No replies to this topic

#1 0207100

0207100
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 22 March 2006 - 09:32 PM


I need to insert 2 variables into a url that is part of a function and can't seem to do it. I know the code below has an error in it and am thinking I need to make $_SERVER[REMOTE_ADDR] and http://" . $_SERVER[SERVER_NAME] . $_SERVER[REQUEST_URI]; some sort of a var but am clueless how to do it.

Any help will be greatly appreciated.



The following code is a snip of the code.



return $children;
}
$url = "http://domain.com/xml_feed.php?p_id=1002&ad_count=5&channel=1&doc_offset=0&keyword=entertainment&limited=0&uip=$_SERVER[REMOTE_ADDR]&referring_page=$page_url ="http://" . $_SERVER[SERVER_NAME] . $_SERVER[REQUEST_URI];"; //URL of the XML FEED

$contents = file_get_contents($url);

$data = GetXMLTree ($contents);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users