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

curl-and-php

Re: (no subject)

From: Michael Hulse <micky_at_ambiguism.com>
Date: Tue, 27 Dec 2005 12:02:30 -0800

You might try the include syntax like so:

        include($_SERVER['DOCUMENT_ROOT'].'/QI.xml');

also,

       xml_parse_into_struct($xml_parser, $data, $vals, $index);

Maybe I am dumb, but where is $vals and $index set?

Good luck,
Cheers,
Micky

On Dec 27, 2005, at 11:41 AM, Jerry Swanson wrote:

> This code below gives me  the following: The parameter is incorrect.
>  
> What is wrong with this code?
>  
> <?php
>
>       include 'QI.xml';
>        $url = "https://www.mywebsite.com/Test";
>        $page="/APP.asp";
>
>        $post_string = $request;
>        $page1="App.asp";
>        $header  = "POST ".$page1." HTTP/1.0 \r\n";
>        $header = "MIME-Version: 1.0 \r\n";
>        $header .= "Content-type: application/PTI26 \r\n";
>        $header .= "Content-length: ".strlen($post_string)." \r\n";
>        $header .= "Content-transfer-encoding: text \r\n";
>        $header .= "Request-number: 1 \r\n";
>        $header .= "Document-type: Request \r\n";
>        $header .= "Interface-Version: Test 1.4 \r\n";
>        $header .= "Connection: close \r\n\r\n";
>        $header .= $post_string;
>
>        $ch = curl_init();
>        curl_setopt($ch, CURLOPT_URL,$url);
>        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>        curl_setopt($ch, CURLOPT_TIMEOUT, 4);
>        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
>
>        $data = curl_exec($ch);        if (curl_errno($ch)) {
>            print curl_error($ch);
>        } else {
>            curl_close($ch);
>        }
>        $xml_parser = xml_parser_create();
>        xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0);
>        xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE,1);
>        xml_parse_into_struct($xml_parser, $data, $vals, $index);
>        xml_parser_free($xml_parser);
>
> ?>_______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-12-27