Jump to content

Warning Message regarding


Noesis

Recommended Posts

The following piece of POST header details to output to a file in JSON format returns the following error:

[/code]$params = array("user" => $enjin_id);

$query = http_build_query($params);
$contextData = array("method" => "POST", "header" => "Connection: close\r\n" . "Content-Length: " . strlen($query)."\r\n", "content" => $query );
$context = stream_context_create(array ( "http" => $contextData ));
 
$result = file_get_contents($url, FALSE, $context);[/code]

 

error:

 

 

file_get_contents(): Content-type not specified assuming application/x-www-form-urlencoded

 

 

Can anyone advise what I need to do to ensure that the process is correctly set, of which I assume I need to declare a MIME type and where it is needed?

Link to comment
https://forums.phpfreaks.com/topic/290261-warning-message-regarding/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.