0

Hi,
I've contacted some website administrators for their API, inreturn, they have asked for source IP to whitelist it so that only requests from that IP will be considered as legit (its ok even if its shared IP).

So, now the problem is how do i get ip of site. Being a PHP developer, I've tried gethostbyname() which gives random ip's & also $_SERVER['REMOTE_ADDR'] (called from other server) which always gives the single IP. I'm totally confused with this & also, I've very less time to give them my source IP.

I don't have paid hosting. I always use, free tiers of appfog (.aws.af.cm) & openshift (-name.rhcloud.com). It would be great if someone can tell me process for finding any of those IP address or show me a way to get static IP(which i could share with them) for free or anyother host. Also,they have given permission to use this api only for 10days. Thanks in advance.

3
Contributors
2
Replies
12
Views
3 Years
Discussion Span
Last Post by JorgeM
0

So, now the problem is how do i get ip of site.

Do you mean the IP of the web server? That would need to be provided by the web server hosting/provider.

& also $_SERVER['REMOTE_ADDR']

If you are using this code in your web page, you are collecting the source iP of your web page visitor, not the web server itself.

So, to clarify, which IP address are you trying to get, the web visitor or the web server?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.