cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Re: Passing data to Web Java Applet

From: imran khalid <imranlink_at_hotmail.com>
Date: Wed, 10 Mar 2004 05:52:13 +0000

Hi Daniel,

The Web page i am trying to post SMS text is
http://orion.vectracom.net/webchat_paktel3/
This page has 5 text boxes and two buttons inside the Java Applet but the
HTML code only shows 3 "param" names inside the Applete tag. When i access
this page by posting CURLOPT_POSTFIELDS, I got an ERROR Meaage

Method Not Allowed
The requested method POST is not allowed for the URL
/webchat_paktel3/index.html.

Apache/1.3.20 Server at orion.vectracom.net Port 80

I am pasting my CURL + PHP code below

<?php
        $LOGINURL = "http://orion.vectracom.net/webchat_paktel3/";
        $POSTFIELDS = "img=copyright5.gif&NICK=MyNick&img1=smschat_2.gif";
        $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$LOGINURL);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiesms");
        curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiesms");
    $result = curl_exec ($ch);
    curl_close ($ch);
        echo $result;
?>
COntents of Applet page
<!--http://orion.vectracom.net/webchat_paktel3/-->
<html>
<head>
<title>VectraCom: SMS Chat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000" topmargin=0 leftmargin=0>
<APPLET CODE = "pak_chat" WIDTH = 410 HEIGHT = 300>
     <param name="img" value="copyright5.gif">
     <param name="NICK" value="MyNick">
     <param name="img1" value="smschat_2.gif">
</APPLET>
</body>
</html>

Sincerely,

Imran Khalid (Aztek Web Developer)
Phone: +92 437 / 602955
Mobile: +92 300 / 6230287
Email: imranlink_at_hotmail.com
..................................................

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
Received on 2004-03-10