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

curl-and-php

Re: sending POST data to remote server

From: Stephen Pynenburg <spynenburg_at_gmail.com>
Date: Sun, 30 Nov 2008 20:27:47 -0500

Location.toString is a JavaScript method, so it's only a javascript error.
If it is interfering with your request (e.g, missing redirects) then you
will have to parse the script accordingly.

-Stephen

On Sun, Nov 30, 2008 at 2:53 PM, Lukas Polak <polak.lukas90_at_gmail.com>wrote:

> Hi,
>
> I have a problem with sending data to remote server. Actually, not to every
> remote server so I want to ask if there are any conditions for that remote
> server which have to be obey like that remote server have to have switched
> on curl extension too or something like that. My source code is :
>
> $ch = curl_init("http://byt.sk/inzeraty-byty-predam.php");
>
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
> curl_setopt($ch, CURLOPT_HEADER, TRUE);
> curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
> curl_setopt($ch, CURLOPT_POST,TRUE);
> $postData = array("_id_kraj"=>"100",
> "_strPrev"=>"50",
> "_strFrst"=>"0",
> "_strNext"=>"150",
> "_strLast"=>"11253",
> "_btnNext"=>"+50+>+");
> $post =
> "_id_kraj=100&_strPrev=50&_strFrst=0&_strNext=150&_strLast=11255&_btnNext=+50+>5";
> curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
>
> $result = curl_exec($ch);
> echo $result;
>
> Several names of variables are in Slovak, but it isn't importat what they
> mean. When I execute it firebug shows me error "Permission denied to call
> method
> Location.toString". It doesn't show up when I try to send POST data to my
> server where I'm sure that curl is installed.
>
> Thanks,
> elf
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>

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