Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by gdfhghjdfghgfhf

  1. Please delete my account and all messages posted on the forum. Bye.
  2. What a waste of time, i came here just to get a link to a manual i've already read, with no other additional informations. This forum is useless, back to Stack Overflow. You can delete my account here.
  3. Can you elaborate ? Just linking the manual with so many different parameters isn't helping me CURLOPT_HTTPHEADER An array of HTTP header fields to set, in the format array('Content-type: text/plain', 'Content-length: 100') So my problem is that i didn't set the content-length ? Or i don't need the "ACCEPT" Part ? Or is it something else ?
  4. i looked everywhere but couldnt find a solution... how do i parse discogs bbcode and convert it to html, or just strip it out ? api is returning band biographys with lot of non-standard bbcode and discogs internal link... how can i parse it to human-readable text ready to be displayed to end user on my website ? i asked in discogs forum and got this answer: If you don't want that specific format, you can include an Accept header in your response with your preferred response type. We currently offer Discogs format (what you've got now), plaintext (URLs and other formatting is just stripped away), and HTML. For more information, see the API docs: https://www.discogs.com/developers/#page:home,header:home-versioning-and-media-types So i tried this but it didn't work: curl_setopt($ch, CURLOPT_HTTPHEADER, array('application/vnd.discogs.v2.html+json')); here's what i have so far $ch = curl_init(); //initialize the session curl_setopt($ch, CURLOPT_USERAGENT, 'APN/1.0 +https://www.anarcho-punk.net'); //Set the User-Agent Identifier curl_setopt($ch, CURLOPT_URL, $discogs_label_apiurl); //Set the URL of the page or file to download. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Ask cURL to return the contents in a variable instead of simply echoing them //curl_setopt($ch, CURLOPT_HTTPHEADER, array('application/vnd.discogs.v2.html+json')); // curl_setopt($ch, CURLOPT_HTTPHEADER, array('ACCEPT' => 'application/vnd.discogs.v2.html+json')); curl_setopt($ch, CURLOPT_HTTPHEADER, array('ACCEPT' => 'text/html')); $output = curl_exec($ch);
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.