Please how can I turn

curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "http://search.yumpu.com/2.0/search.json?q=s.moser&in=author"

to php.

Thanks.

<?php

$opts = array(
  'http'=>array(
    'method'=>"GET",
    'header'=>"Accept: */* \r\n" .
            "Accept-Encoding: gzip, deflate\r\n".
              "Host: search.yumpu.com\r\n" .
              "User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0\r\n"
  )
);

$context = stream_context_create($opts);
$imm = "http://search.yumpu.com/2.0/search.json?q=s.moser&in=author";

$result = @file_get_contents($imm,false,$context);

Ok. but I don't see the access token being referenced here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.