|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
connecting to usenet with php?
So far, this script connects to the NNTP server, but it won't send the test message.. any idea why?
<?php require_once "sss.php"; $nntp = new Net_NNTP; $ret = $nntp->connect("news.usenetserver.com",119,"xxxxx","xxxxx"); if( PEAR::isError($ret)) { echo "you are not connected"; exit; } else { echo "you are connected"; $subject = "Testpost"; $newsgroup = "alt.test"; $body = "Le Mardi 12 f=E9vrier 2002, this is a test message using special french chars"; $from = "test@example.com"; $addheader = "Content-Transfer-Encoding: quoted-printable\n". "Content-Type: text/plain; charset=ISO-8859-1;"; $response = $nntp->post($subject, $newsgroup, $body, $from, $addheader); if (!$response) { echo "<br>not sent"; } else {echo "message sent"; } } ?> |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > connecting to usenet with php? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|