@aryan200x
gethostbyname() not resolving hostname to ip
<?php echo gethostbyname('tmp12.websaz.af'); ?>
When you used a subdomain it should be in a name of the folder that has your website files.
So when you echo out from a subdomain it should be within the folder.
For example: The _name is the folder where you put your stuff.
This is how you should echo out from the subdomain:
<?php echo gethostbyname('tmp12.websaz.af/_name'); ?>
LastMitch
Industrious Poster
4,191 posts since Mar 2012
Reputation Points: 134
Solved Threads: 336
Skill Endorsements: 45
@aryan200x
Instead of gethostbyname() function
Try used gethostbyaddr() function.
You need to put property.websaz.af in a folder called property
When you type tmp12.websaz.af/property then it will open.
LastMitch
Industrious Poster
4,191 posts since Mar 2012
Reputation Points: 134
Solved Threads: 336
Skill Endorsements: 45
@aryan200x
If you know that some settings should be applied on the server then could you please write the instructions?
I hope you know that you can't really get visitors actual real Ip address.
As far as I know there's no script that can do that.
You just want to find someone ip address? Right?
You don't need to used this gethostbyname() function anymore.
Read and try the code from this article (the code is a link):
http://www.webproworld.com/webmaster-forum/threads/97509-Getting-a-visitors-real-Ip-address
LastMitch
Industrious Poster
4,191 posts since Mar 2012
Reputation Points: 134
Solved Threads: 336
Skill Endorsements: 45
@aryan200x
Someone advised that gethostbyname function is not working properly to resolve subdomains to your ip address.
If that person advised you to use this function then did this person told you it should look like this:
gethostbyname('subdomain.domain');
If you still have issue please post your code. Right now I feel everyone is guessing including me.
LastMitch
Industrious Poster
4,191 posts since Mar 2012
Reputation Points: 134
Solved Threads: 336
Skill Endorsements: 45
Question Answered as of 4 Months Ago by
LastMitch,
pzuurveen
and
exactprecisions