PHP function used to open (Internet or Unix domain) sockets connections.
Questions tagged [fsockopen]
382 questions
0
votes
1 answer
Unable to connect to a server using fsockopen
Error in nginx error log :
fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in on line
I am able to connect using FileZilla, WinSCP and also…

Jigar
- 3,256
- 1
- 30
- 51
0
votes
1 answer
302 Moved when open page using the function fsockopen()
I try to open a page using the function fsockopen(), but I get the following output: "HTTP/1.1 302 Moved Temporarily". How can I get past this?

firasmf
- 1
- 1
0
votes
1 answer
fsockopen socket connection is established in constructor but is null in other methods
I'm writing a php IMAP API. The constructor connects to them Gmail server and stores the socket in a variable. When I use the same socket connection in another method, the connection is null. Why does this happen and how can I fix it?
class Imap{
…

W.K.S
- 9,787
- 15
- 75
- 122
0
votes
2 answers
False eof from feof() with sockets fgets
I have inherited a piece of code which uses the fetchURL() function below to grab data from a url. I've just noticed that it is often getting feof() returning true before the full page of data is retrieved. I have tried some tests and using CURL of…

Captain Payalytic
- 1,061
- 8
- 9
0
votes
1 answer
PHP Sockets - Not Reading Output
I'm having some problems reading from a socket. Basically, I can connect to the machine without an error. I can write to the machine without an error. I cannot seem to read the output.
Here is what I'm doing:
$header1 =…

Cory Dee
- 2,858
- 6
- 40
- 55
0
votes
1 answer
HTTP Header specifications
I am trying to send/receive requests using PHP's fsockopen().
I just wanted to ask what are the required headers for different types of HTTP methods?
these are Google's response header
HTTP/1.0 200 OK =>
Date => Mon, 14 Jan 2013 08:21:29 GMT…

kapitanluffy
- 1,269
- 7
- 26
- 54
0
votes
0 answers
Zend_Mail_Storage_Imap fails but imap_open works
I have written some code to fetch emails from a Gmail mailbox using Zend_Storage_Mail_Imap library. Till now, it was running fine on the development server (where imap_open was disabled). After I moved it to production(imap_open is enabled), the…

gentrobot
- 673
- 6
- 25
0
votes
1 answer
php fsockopen unable to connect, connection timeout error
I am running a local apache server on an ubuntu machine, and i am trying to use the phpmailer class to send mail.
It tries to connect by fsockopen to the mail server, but it throws a timeout error. I tried setting the timeout to 15sec with no…

Gabriel Solomon
- 29,065
- 15
- 57
- 79
0
votes
0 answers
Cache fsockopen result?
Is it possible to cahce the result of fsockopen for, lets say, 5 minutes?
This i need because of the slow website loading, i went from 0.00001s page load to 1.00137s page load time with fsockopen (this is when the server does not…

Unknown
- 1,871
- 1
- 11
- 11
0
votes
1 answer
PHP json_encode adds some number (hex?) to the beginning of the json-string
I am echoing json_encoded data from one php script to another (the request is made by fsockopen/GET).
When having encoded an array with 40 elements, there is no problem. When doing exactly the same thing with 41, some numbers and \r\n is added to…

Nicsoft
- 3,644
- 9
- 41
- 70
0
votes
0 answers
Getting website data/information with php with fsock using alternate ip
Possible Duplicate:
Specify source ip using fsockopen
I have a VPS that have a couple of IP addresses.
I want it to connect to a website like a proxy to acquire the website. The script is working perfectly but I need it to use the different IP…

Emil Hemdal
- 589
- 2
- 8
- 27
0
votes
1 answer
PHP fsockopen Is Slow
I'm playing around with the IMAP protocol in PHP using fsockopen to send and receive commands. My preliminary experiments work but are insanely slow. It takes about 2 minutes for the simple function below to run. I've tried several different IMAP…

joshwbrick
- 5,882
- 9
- 48
- 72
0
votes
0 answers
Codeigniter Email Class Error
I can send e-mail in my local server using following codes,
$config['protocol'] = 'smtp';
$config['charset'] = 'UTF-8';
$config['mailtype'] = "html";
$config['wordwrap'] = TRUE;
$config['smtp_host'] =…

levye
- 235
- 2
- 11
0
votes
1 answer
How can i use fsockopen on my site?
I'm using curreny codes on my site. With the following:

user1750573
- 45
- 1
- 10
0
votes
1 answer
How Do I use curl_post_async() to Run PHP Script in the Background?
I expected the followingcode would create a file, test.txt, in the same directory of the loading script when the page is accessed. But it doesn't. Nothing happens. Could somebody tell what is wrong with this code? Does it work fine in your…

Teno
- 2,582
- 4
- 35
- 57