Using $_SERVER[SERVER_ADDR] In SRC Url?Aug 30, 2006
I've just begun exploring php and have a question about the $_SERVER[SERVER_ADDR] variable.
My dilemma is as follows. Recently i created a webpage that use an embedded php script to stream audio from my site. The trouble i have is that i'm on dynamic IP connection.
Whenever my IP changes the absolute adresses on my index.html page to the php components break and the site don't work properly until i've manually corrected this. Since this requires constant monitoring of the site i've been trying to find a solution to fix this.
My thought then went to using the $_SERVER[SERVER_ADDR] variable in these url' to update them automatically. However, it only worked partially.
In the following lines it was possible to change the IP number part in the url with a variable containing the $_SERVER[SERVER_ADDR] string........