| Webspace & Domain Names This is a discussion on, fsockopen - help please within the Freedom2Surf forum; I used to use fsockopen() and it worked fine in my php script. Same script runs fine at home on ... |
![]() |
![]() |
|
LinkBack | Thread Tools | ![]() |
|
|
#1 |
|
Join Date: Jul 2002
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
|
fsockopen - help please
I used to use fsockopen() and it worked fine in my php script. Same script runs fine at home on my desktop in a WAMP environment but fails now at f2s. The problem apparently is that the timeout parameter to connect to the remote server is set to 15 at f2s whereas my default value at home is 60. Tried to change the default value at f2s using ini_set() and it failed apparently.
Last edited by php4ever; 08-06-2009 at 09:36 AM. |
|
|
|
|
|
#2 |
|
Join Date: Jul 2002
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
|
Re: fsockopen - help please
I also thought maybe I could get around the fsockopen() issue by using curl. Wrote a curl script and it executed fine on my local server but as soon as I uploaded that script to f2s, it failed! Now, according to my understanding curl is enabled at f2s, so why would my script work on my local web server and fail at f2s?
|
|
|
|
|
|
#3 | |
|
Join Date: Feb 2005
Location: Newbury
Posts: 275
Thanks: 1
Thanked 0 Times in 0 Posts
|
Re: fsockopen - help please
Don't know anything about fsockopen(), but I did spot this in the manual - don't know if it's relevant:
Quote:
|
|
|
|
|
|
|
#4 |
|
Join Date: Jul 2002
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
|
Re: fsockopen - help please
JeffG,
Thanks for trying to help me out. But as you realized, the timeout that is the issue here is the connection timeout which has a default of 60 on my localhost on my desktop but f2s has given it a default of 15. Why? That's the mystery! |
|
|
|
|
|
#5 |
|
Former Freedom2Surf Staff
Join Date: Sep 2005
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
|
Re: fsockopen - help please
[QUOTE=php4ever;95878 The problem apparently is that the timeout parameter to connect to the remote server is set to 15 at f2s whereas my default value at home is 60. QUOTE]
It depends what/where the remote server is? |
|
|
|
|
|
#6 |
|
Join Date: Jul 2002
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
|
Re: fsockopen - help please
Gotta say that overall what was initially a bit frustrating turned out to be a great learning experience. Thank you everyone for your input.
|
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
All times are GMT. The time now is 05:38 PM.







