• support[@]kurinchilion.com
  • +1 (888) 666-4252

Query string limit in GET data and Size limit in POST Data

Nov 10, 2009 - by kurinchilamp / HTML / Post Comment
RFC 2616 - Section 3 states: "Servers should be cautious about depending on URI lengths above 255 bytes because some older client or proxy implementations may not properly support these lengths." Different browser agents support different URI length acceptance. In addition, servers too play a role in accepting/denying URI's over certain length which may either truncate the URI or may give lengthy URI message indications. It is always advisable to rely on shorter URI's and to post data when more field sets are to be transferred across web pages. POST data too has its limit. In this case, it is the size of the data which is controlled by the server settings. Some interesting discussions: Limit on query string GET URL parameters
Continue Reading

PHP: How to post XML data using CURL?

Oct 04, 2009 - by kurinchilamp / / Post Comment
During integration projects or during such similar situations you may have across a necessity to transfer XML data or plain text file across server locations. Curl comes in handy during such scenarios. Following program is used to post XML data using Curl. In order for Curl to function, ensure that PHP settings has the curl module installed and that the libraries/dll libeay32, ssleay32 is installed in your server.
<?php
/* 
  File name: postdata.php
*/

$post_url = "http://localhost/demo/postdata2.php";
$xml_string = '<?xml version="1.0" encoding="UTF-8"?>
<books>
<book isbn="978-1594489587">
    <title>The Brief Wondrous Life of Oscar Wao</title>
    <publisher>Riverhead Hardcover </publisher>
    <amazon_price>14.97 </amazon_price>
    <author_firstname>Junot </author_firstname>
    <author_lastname>Diaz </author_lastname>
  </book>
<book isbn="999-1594489501">
    <title>A Thousand Splendid Suns </title>
    <publisher>Riverhead Hardcover </publisher>
    <amazon_price>14.27 </amazon_price>
    <author_firstname>Khaled </author_firstname>
    <author_lastname>Hosseini </author_lastname>
  </book>
</books>';


$ch = curl_init($post_url);

curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "xmldata=".$xml_string);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);


$data = curl_exec($ch); 
// to get information on the curl resultset
$info = curl_getinfo($ch);

if(curl_errno($ch)){
    print curl_error($ch);
}

curl_close($ch);

?>
Continue Reading

TECHNOLOGY DEV STACK

Following are some of the technologies that we use to build and maintain solutions for our clients.