php - cURL can't cannot be connected to link -


i want grab data local web server why result there no picture , fitting log entry the//localhost/xampp script this,

<?php  //$curl -v -x post --data "client_id=your_client_id&client_secret=your_client_secret&redirect_uri=your_redirect_uri&grant_type=authorization_code&code=authorization_code"  //"https://dms.myopenbee.com/ws/oauth2/token"  $headers = array(         "access_token"=>"fhditdjru1fghjiu3zg",         "token_type"=>"bearer",          "location"=> "http://10.11.12.156:8000/ws/v2/users",   );    $url = 'http://10.11.12.156:8000';    $ch = curl_init();    curl_setopt($ch, curlopt_url, $url);  curl_setopt($ch, curlopt_post, false);  curl_setopt($ch, curlopt_httpheader, $headers);  curl_setopt($ch, curlopt_returntransfer, true);  curl_setopt($ch, curlopt_ssl_verifypeer, false);  curl_setopt($ch, curlopt_followlocation, true);    $result = curl_exec($ch);    curl_close($ch);    $result_arr = json_decode($result, true);    print_r($result_arr);    echo $result;  ?>


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -