I want only name from http://developers.bringg.com/docs/users using curl in my wordpress custom plugin for custom field Driver_info.
{
extract($_POST);
$url = 'http://parklee.loc/my-spaces-2/';
$url = 'http://api.bringg.com/partner_api/users';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS, "id=2");
$result = curl_exec($ch);
echo "<pre>"; print_r($result);
curl_close($ch);
}
pls tell me whats wrong in this code.I am getting error 404,Not found.
I wrote this line of code inside
{
function order_my_custom( $post ){
$shipping = get_post_meta( $post->ID, 'driver_info', true );
wp_nonce_field( 'save_BFM_shipping', 'BFM_shipping_nonce' );
woocommerce_wp_select( array( 'id' => 'driver_info', 'label' => __('Driver Info: ', 'woocommerce'), 'options' => array(
'OPTION1' => __('c1', 'woocommerce'),
'OPTION2' => __('c2', 'woocommerce')
) ) );
}
}
And Instead of c1,c2 i wnat name.
Reading the documentation of how to retreive users, you need to send
company_id
as a parameterNow all you need is in your response variable, you can dump it to see its content and to know how to loop through it