oauth错误:(无法连接到服务器)在oauth getRequestToken方法中

I asked this question once time in https://stackoverflow.com/questions/12814603/ but i do not know why my question closed!

I found my answer and i would like to share it, now.

Question

I have a script to send invitation email to web-mail services.

But now, I get error without any change to the code. When I run script, the browser status bar shown "Waiting for domain.com"

And after several seconds I give following error in oauth->getRequestToken:

making the request failed (Couldn't connect to server)

I want to know why this error occur or what are the reasons to happen this error? Dose it related to firewall (csf) settings (e.g. Blocked port and etc.)?

NOTE: I do not any change in my code when it works or now.

PHP 5.2.17 CentOS 6.2 oauth last released

In my question I said i am using csf firewall and asked Dose it related to firewall (csf) settings (e.g. Blocked port and etc.)?

My csf firewall was blocked Google and Yahoo IPs.

The problem solved after i added Yahoo and Google IPs to Allow IPs in csf firewall setting.

Just put following IPs:

173.194.0.0/16 # Google
77.0.0.0/8 # Yahoo