I am trying to make a POST request to a URL using Curl but getting this error? -


error:

request entity large requested resource /check.php not allow request data post requests, or amount of data provided in request exceeds capacity limit.

whar reason error? think data size cannot reason , know ./check.php accepts post method. security lmiting access?

regards, aqif

if want use post have use curlopt_post , curlopt_postfields in order. having result handy debugging well.

<?php   $params=array(   'a'=>'text1',   'b'=>'text2' );  $curl=curl_init();  curl_setopt($curl, curlopt_post, true); curl_setopt($curl, curlopt_postfields, $params);  curl_setopt($curl, curlopt_returntransfer, true);  $result=curl_exec($curl);  print $result; 

edit: note, if want send no parameters post, use empty array. empty string break curl.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -