Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
edited title
Link

Post a JSON object from PHP using cUrl

deleted 338 characters in body
Source Link

I have created a JSON object using php functionality json_encode

The Object is formulated this way:

$object_array[]=array('value1' => $value1, 'value2' => $value2);

$json_output = json_encode($object_array, JSON_UNESCAPED_SLASHES);

I need to post the $json_output to a URL using the 'cUrl' functionality of PHP.

Can anyone suggest the best way to go about it ? (Just incase it helps, I am coding such functionality to be used in a Wordpress backend - The Array is being created in the theme functions)

I need to post the Object to another server which will not use PHP to decode. Is it possible to use something to just sendbased on the exact object ? something similar to $.post("url", $json_output) ? How can I integrate php and jquery/ajaxabove code ?

I have created a JSON object using php functionality json_encode

The Object is formulated this way:

$object_array[]=array('value1' => $value1, 'value2' => $value2);

$json_output = json_encode($object_array, JSON_UNESCAPED_SLASHES);

I need to post the $json_output to a URL.

Can anyone suggest the best way to go about it ? (Just incase it helps, I am coding such functionality to be used in a Wordpress backend - The Array is being created in the theme functions)

I need to post the Object to another server which will not use PHP to decode. Is it possible to use something to just send the exact object ? something similar to $.post("url", $json_output) ? How can I integrate php and jquery/ajax ?

I have created a JSON object using php functionality json_encode

The Object is formulated this way:

$object_array[]=array('value1' => $value1, 'value2' => $value2);

$json_output = json_encode($object_array, JSON_UNESCAPED_SLASHES);

I need to post the $json_output to a URL using the 'cUrl' functionality of PHP.

Can anyone suggest something based on the above code ?

added 241 characters in body
Source Link

I have created a JSON object using php functionality json_encode

The Object is formulated this way:

$object_array[]=array('value1' => $value1, 'value2' => $value2);

$json_output = json_encode($object_array, JSON_UNESCAPED_SLASHES);

I need to post the $json_output to a URL.

Can anyone suggest the best way to go about it ? (Just incase it helps, I am coding such functionality to be used in a Wordpress backend - The Array is being created in the theme functions)

I need to post the Object to another server which will not use PHP to decode. Is it possible to use something to just send the exact object ? something similar to $.post("url", $json_output) ? How can I integrate php and jquery/ajax ?

I have created a JSON object using php functionality json_encode

The Object is formulated this way:

$object_array[]=array('value1' => $value1, 'value2' => $value2);

$json_output = json_encode($object_array, JSON_UNESCAPED_SLASHES);

I need to post the $json_output to a URL.

Can anyone suggest the best way to go about it ? (Just incase it helps, I am coding such functionality to be used in a Wordpress backend - The Array is being created in the theme functions)

I have created a JSON object using php functionality json_encode

The Object is formulated this way:

$object_array[]=array('value1' => $value1, 'value2' => $value2);

$json_output = json_encode($object_array, JSON_UNESCAPED_SLASHES);

I need to post the $json_output to a URL.

Can anyone suggest the best way to go about it ? (Just incase it helps, I am coding such functionality to be used in a Wordpress backend - The Array is being created in the theme functions)

I need to post the Object to another server which will not use PHP to decode. Is it possible to use something to just send the exact object ? something similar to $.post("url", $json_output) ? How can I integrate php and jquery/ajax ?

Source Link
Loading