[SOLVED]http ip address stored in variable?

Pfap

Member
I thought I read somewhere that with the http functions you want to use the actual string and not a variable holding the string.

Is this more correct:
Code:
http_get("http://127.0.0.1.com");
than this:
Code:
my_address = "http://127.0.0.1.com";
http_get(my_address);

Is there any reason you would not want to store an address in a variable?
 

FrostyCat

Redemption Seeker
That is a complete myth, the address can be in a variable as long as the right value is in it.

Also, it's 127.0.0.1 (AKA localhost), not 127.0.0.1.com. There is no .com or anything of the sort at the end when you reference by IP address.
 

Pfap

Member
That is a complete myth, the address can be in a variable as long as the right value is in it.

Also, it's 127.0.0.1 (AKA localhost), not 127.0.0.1.com. There is no .com or anything of the sort at the end when you reference by IP address.

Cool, thanks for clearing that up. I was simply using localhost to protect my actual hostname hence the .com.
 
Last edited:
Top