curl-and-php
newbie problems with script and parameters
Date: Mon, 1 Oct 2007 00:21:14 +0200
Hi,
I'm New on a list. And I'm also New In case Curl.
I wrote page which is a php-generated formular:
http://macres.pl/scripts/autogen.php?ra1=11
<http://macres.pl/scripts/autogen.php?ra1=11&ra2=11&ra3=11&decl1=22&decl2=11
&decl3=20&radius=30&limit=19.0&year=2007&month=9&day=11.22&which=obs>
&ra2=11&ra3=11&decl1=22&decl2=11&decl3=20&radius=30&limit=19.0&year=2007&mon
th=9&day=11.22&which=obs
This page send a values to another page which is CGI script based. It's
external. I want to save output and future
Processing but script below save only text values from formular. What's is
wrong? Any redirection?
Thanks for any help!
Best regards,
Maciej
<html>
<?php
$ch=curl_init();
$ch =
curl_init("http://macres.pl/scripts/autogen.php?ra1=11&ra2=11&ra3=11&decl1=2
2&decl2=11&decl3=20&radius=30&limit=19.0&year=2007&month=9&day=11.22&which=o
bs");
//curl_setopt($ch, CURLOPT_URL,"$nt_runtime_URL");
ob_start();
curl_exec($ch);
curl_close($ch);
$fileHandle = fopen('./output_.html', 'w+')
OR die ("Can't open file\n");
$result = fwrite ($fileHandle, ob_get_contents());
if ($result)
{
echo "Data written successfully.<br>";
} else {
echo "Data write failed.<br>";
}
fclose($fileHandle);
ob_end_clean();
?>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-10-01