Best way to get another Facebook user's IP address - facebook

My Facebook application needs the IP Address of another user to communicate with that other user. So two users are using my application and one user wants to communicate with the other user. How does user A get the IP address of user B, or alternatively how does user B send its IP address to user A?
If this is not possible without passing the data manually is there a DB table that the IP address can be written to. My Facebook application has the ability to get its own local IP address. I just need a way to get the remote IP address using API's.

Facebook don't have support for any custom data storage, you will need to handle this on your own in your applications server code.
Basically you will need to have a database (or similar storage) where you store facebook user id and IP-address.
Another note is that you can't get another Facebook users IP-address from Facebook, you need to get it from your connection to the user.

Have both users connect to a server of your choice, register the IPs there.

Facebook does not supply users' IP addresses, so you'll need to handle this on your own. You should be able to retrieve this from the HTTP request headers your users submit. Check the source IP and store it in a database, then use that to send to the other user.

Related

Find email IMAP incoming/outgoing server ip and port

My organization has own email id and can be accessed through web-browser. Now I want to setup IMAP in Gmail app in android. This requires specific incoming/outgoing server ip, port, security certificate. However, to my surprise "Mail.ru" app automatically recognizes everything (I just need to provide my email id and pass) and works perfectly (both in the organization network or outside world). These informations are also required to setup email in thunderbird. Is there any way to know this, like tracing packet, or any other way?
N.B: Nadmin don't want to share these info. This page does not help much.
Many email clients support some kind of Autodiscovery, where based on the domain name certain well-known URLs are tried in an attempt to download an XML document containing information about the SMTP and IMAP settings applicable for that domain.
Here is some Microsoft documentation about it:
https://technet.microsoft.com/en-us/library/cc511507.aspx
See also:
https://serverfault.com/questions/172326/how-to-configure-email-autoconfiguration-for-a-domain

How can I ban a specific socket from reconnecting to my chat?

I'm writing a multi-client chat with managers and simple users. Whenever a manager kicks a user I don't want them to be able to just reconnect with the same username and IP address. How can I achieve something like that? I'm working in python, but I think a generic explanation of the idea might be better for more people to understand it.
1)You can store the ip in the banned ip database and then check if the the user is banned
2) if you do not want to use database you can just create a cookie when managers kicks the user and store at client side and check whether a client is banned or not.
But solution 1 is more reliable

ip address range of google notification servers google-cloud-storage

We have setup google object notification for buckets in google-storage, our network administrator wants to restrict incoming ip address and wants it to be only google specific.
Is there a range of IP address that are used by google for posting object notification request?
There are no guarantees about what IP addresses the notifications will come from.
Instead, when you initially create the notification channel, set a custom client token. When notifications are delivered, they will include the custom token. Your servers can verify the token before processing the incoming messages.

How to detect multiple registration to the web from a single user

use php and mysql,
My situation: users register to the web by entering username, email, password , birthday, sex and then activate account by clicking the link in their mails. Email and password are used in the log-in process.In database,I also record IP address and date-time of registration.
The problem is some users registered too much accounts to do something on the web as I limited one account per one click. The easy way is to check their IP address is existed or not, but in some academy organisation or company use the same IP address for all computers.
How to limit their registration and not to effect everyone who are those in the same ip address?
Think of a way to block automatic registration. That's usually why you see the many registrations pattern. Robots crawl and register any site they find and can figure out.
I usually encode the FORM and use JS document.write() to print the form. Or use a hidden field filled by JS using and external obfuscated file. Or a CAPTCHA...
See if this does not fix your problem...

(iphone) How to change the server ip without shipping an updated application?

My application talks to my server and currently server's ip is embedded in the client application.
For any reason, I might have to change the server's location(and it's ip).
With current setup, I'll have to ship a new version with new server ip embedded.
I guess I could get a domain name and embed the domain name in the app, so that I can dynamically change the server machine(with domain name fixed).
Is there other options I could take?
Thank you
You should definitely use DNS. Get a domain name, they are very inexpensive.
If for some reason you absolutely refused, you could devise a way to send a push notification to the phone for IP changes, but if a user has notifications off then you are out of luck.