A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: core/MY_Controller.php

Line Number: 258

Backtrace:

File: /home/lourenss/www/pingen_www/application/core/MY_Controller.php
Line: 258
Function: _error_handler

File: /home/lourenss/www/pingen_www/application/core/MY_Controller.php
Line: 54
Function: get_browser_language

File: /home/lourenss/www/pingen_www/application/controllers/Api.php
Line: 7
Function: __construct

File: /home/lourenss/www/pingen_www/index.php
Line: 316
Function: require_once

Pingen | Send Letters Online for Private, Business and Software Developers

Example in .NET

We're going to send an existing document with id 53 via post mail. In Color and as fast as possible!

    using (WebClient client = new WebClient()) {
           string jsonRequest = new JavaScriptSerializer().Serialize(new { speed = 1, color = 1 });
           client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
           string jsonResponse = string.Empty;
           try {
               jsonResponse = client.UploadString("https://api.pingen.com/document/send/id/30/token/MYTOKEN", jsonRequest);
               // parse json and handle it
           } catch (Exception e) {
               WebException we = e as WebException;
               if (we != null && we.Response != null)  {
                   var res = we.Response.GetResponseStream();
                   if (res != null) jsonResponse = new StreamReader(res).ReadToEnd();
               }
               // parse json (if available) and handle error
           }
       }