dswsl2016 2015-12-09 07:56
浏览 114

获取请求php

I am implementing the linkedin API uaing OAuth and I am on fourth step of this documentation: https://developer.linkedin.com/docs/oauth2 My code is working perfectly till step 3 because I obtained the access_token from linked in.

I just want to make a GET request. The sample call in the documentation is given as:

GET /v1/people/~ HTTP/1.1
Host: api.linkedin.com
Connection: Keep-Alive
Authorization: Bearer AQXdSP_W41_UPs5ioT_t8HESyODB4FqbkJ8LrV_5mff4gPODzOYR

How do I implement it in PHP? ANy help will be appreciated. Thanks.

  • 写回答

1条回答 默认 最新

  • duanfu3884 2015-12-09 08:03
    关注

    file_get_contents function will work in addition to curl.

    e.g.
    $response = file_get_contents('http://api.linkedin.com/v1/people/~ HTTP/1.1');
    
    echo $response;
    
    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?