Posting with php ... timeout
rra at stanford.edu
Tue Jul 25 17:59:26 UTC 2000
OlivierS <teardrop at wanadoo.fr> writes:
> Does anyone know how i could easily post a message using php ? ... i
> dont want to use imap_mail cause it is very hard to install ... I am
> trying with fsockopen but i have a problem : there is a timeout during
> the post ... Does anyone can explain me what is really a timeout here
> ?! php should be enough quick to post the message ?!
> $connection = fsockopen("my_serv",119, &$error_number,
> fputs($connection,"mode reader\n");
> fputs($connection,"group foo.foo\n");
You're trying to stream commands after a mode reader; because of INN's
internal architecture, this doesn't work. You need to wait for a server
response after issuing mode reader, and then continue to post.
You don't need to send a group command to post; you can just issue the
post command right away.
Oh, and all lines, including each line of the message, should end in CRLF,
not just LF.
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-workers