OpenID - 获取用户信息?(OpenID — getting user information?)
我想知道是否有可能除了Google的电子邮件之外请求更多信息并获取用户的姓名?
我正在使用JanRain OpenID PHP脚本。
谢谢
I am wondering if it is possible to request more information besides email from Google and get the name of the user also?
Am using JanRain OpenID PHP script.
Thank you
原文:https://stackoverflow.com/questions/665122
最满意答案
在Unix系统中,当使用套接字进行多播时,您应该绑定到INADDR_ANY,而不是接口。
由接口进行多播过滤(即不接收来自指定接口以外的其他接口的mcast)已经到位,因为您正确填写了imr_interface。
So, in the end a little system configuration and bugfixing went a long way:
a) As root, I'd had to do the following to disable the reverse packet filter: echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter + The same for ethX.
b) Add a bogus route for the ethX (route add -net 224.0.0.0. netmask 224.0.0.0 ethX)
c) Bind the socket to the to-be-joined group's IP (otherwise any subsequent socket would get all packets from all groups I joined on that particular port).
d) Set the interface member of the ip_mreq struct to the IP of the adapter we're receiving on.
And then all was fine and dandy, test runs fast & smooth (pulling 125 multicast transport streams @ around 800-900 mbit - sure this can be smarter, but still). Thanks for all the pointers.
相关问答
更多-
您的网络堆栈将定期发送IGMP消息。 您的网络上的交换机可能使用IGMP监听来确定您的计算机需要哪些(如果有)多播消息。 (这是为了避免由于他们没有请求的流量而在主机上施加过多的负载。) 当您的笔记本电脑休眠时,它将停止发送定期消息,确认其对某些多播流量的兴趣。 您的交换机会注意到这一点并停止将流量发送到您的笔记本电脑 我想你需要发现你的笔记本电脑何时从休眠状态恢复并重新添加成员资格到多播组。 我过去通过使用控制代码SIO_ADDRESS_LIST_CHANGE调用WSAIoctl来完成此操作(以及启用/禁 ...
-
您没有正确测试select()错误。 您可以在其中一个中收到错误。 应该recieve == -1 || sent == -1测试recieve == -1 || sent == -1 recieve == -1 || sent == -1 ,但我无法想象你为什么要两次调用select() ,甚至为什么你使用两个套接字。 你只需要一个选择。 试试这种方式,你可能会赶走其他一些错误。 注意:由于您创建套接字的顺序,您不能依赖第二个套接字描述符大于第一个套接字描述符。您必须测试或使用max() 。 You ar ...
-
在Unix系统中,当使用套接字进行多播时,您应该绑定到INADDR_ANY,而不是接口。 由接口进行多播过滤(即不接收来自指定接口以外的其他接口的mcast)已经到位,因为您正确填写了imr_interface。 So, in the end a little system configuration and bugfixing went a long way: a) As root, I'd had to do the following to disable the reverse packet fil ...
-
udp套接字停止接收数据(udp socket stops receiving data)[2023-04-25]
由于您是在互联网上尝试客户端,因此所有互联网新工作都代表着可能的全部原因。 这里没有简单的调试方法。 可能的原因当然可能是软件错误,但也可能是您和远程服务器之间的一些中间网络配置。 您应该使用您和服务器之间的良好wireshark或命令行tcpdump捕获udp流量,并检查您是否停止发送数据包或服务器是否正在停止接收它们。 如果您发送数据包但服务器没有收到它们(服务器上的tcpdump ),那么网络上有一些东西决定过滤您的数据包。 如果它不在服务器上(例如防火墙规则对数据包进行速率限制或类似的事情),那么在 ... -
在网络编程中,空地址字符串表示所有配置的接口 但是,如果指定了IP地址,则套接字将只在具有指定IP地址的接口上侦听。 In network programming empty address string denotes all configured interfaces. If however IP address is specified, socket will only listen on interface with specified IP address.
-
在PHP中获取UDP多播流(get UDP Multicast stream in PHP)[2022-07-31]
$binded = socket_bind($socket, '127.0.0.1', 6073); 应该 $binded = socket_bind($socket, '0.0.0.0', 6073); 否则你只会收集来自本地主机的数据包。 $binded = socket_bind($socket, '127.0.0.1', 6073); Should be $binded = socket_bind($socket, '0.0.0.0', 6073); Or else you will onl ... -
在服务器端,一个套接字用于发送多播,另一个用于接收来自客户端的回复。 当然不。 在客户端,一个用于接收数据的套接字和另一个用于回复服务器的套接字。 当然不。 对等方总是希望回复IP:端口请求来自。 如果添加另一个端口,则会增加无限的配置难度。 如果你只使用一个端口,这很容易。 为此,每个进程使用两个端口没有性能或架构原因。 On server side one socket for sending multicast and another for receiving replies from client ...
-
这很可能是您的发送和接收线程之间的竞争 - 您在接收器加入组之前发送第一个数据包。 这解释了为什么它适用于超时。 This most likely is a race between your sending and receiving threads - you send the first packet before the receiver joins the group. This explains why it works with a timeout.
-
它应该工作正常。 只要你绑定到IN6ADDR_ANY ,然后加入组播组,你应该能够发送和接收单播数据包没有问题。 使用多播时,绑定到IN6ADDR_ANY (或IPv4的INADDR_ANY )很重要。 如果绑定到特定接口,则会破坏Linux系统上的多播。 It should work fine. As long as you bind to IN6ADDR_ANY, then join the multicast groups, you should be able to send and receive ...
-
在linux中的同一个套接字上接收来自不同组的组播数据(Receiving multicast data from different groups on the same socket in linux)[2023-09-23]
不,你不能将套接字绑定到两个端口,每个端口需要一个套接字。 No, you can't bind a socket to 2 ports, you need a socket per port.