Jump to content

cheechm

Members
  • Posts

    256
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

cheechm's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Admittedly my first question wasn't as clear. How might I go around drawing a single pixel line with a vertical gradient?
  2. I've got some code that basically draws a wavefrom line by line (going horizontally). I was hoping to be able to get a vertical gradient, however I'm not too sure where to start. imageline( $img, // x1 (int) ($data_point / DETAIL), // y1: height of the image minus $v as a percentage of the height for the wave amplitude $height * $wav - $v, // x2 (int) ($data_point / DETAIL), // y2: same as y1, but from the bottom of the image $height * $wav - ($height - $v), imagecolorallocate($img, $r, $g, $B) ); The full code is available here: Github Another question I have: Is it possible to fill every part of the PNG image which isn't transparent with a solid colour? Thanks
  3. Perfect. Thanks requinix. Thread solved!
  4. Little help please!! $parameters['audio_clip[uploaded_data]'] = "@http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . "upload/" . $_FILES['test_file']['name'] .";type=". $_FILES['test_file']['type']; $parameters['audio_clip[uuid]'] = gen_uuid(); $parameters['audio_clip[title]'] = "Remote Upload Test"; $parameters['audio_clip[recorded_at]'] = ""; $parameters['audio_clip[tag_list]'] = "tag, podcast, test"; $parameters['audio_clip[category_id]'] = 60; $options = array(); $options['RequestContentType'] = "multipart/form-data"; $options['RequestBody'] = ''; $options['return_auth'] = 1; $auth = $client->CallAPI($url, $method, $parameters, $options, $response); $headers = array( "POST ".$auth['RequestURI']." HTTP/1.0", "Authorization: " . $auth['Headers']['Authorization'], "Accept: */*", "Host: " . $auth['Headers']['Host'], "Content-Type: multipart/form-data", "Content-Length" . $auth['Headers']['Content-Length'], "User-Agent: " . $auth['Headers']['User-Agent'] ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $exec = curl_exec($ch); curl_close($ch); echo "<pre>Output: "; print_r($exec); echo "</pre>"; Trying to upload a file via the API to audioboo.fm . The relevant documentation is here: https://github.com/Audioboo/api/blob/master/sections/audio_clips.md The reply I get from the server is raw attachment invalid/blank. Not sure what I'm doing wrong? I can manage simple PUT/GET requests and I know I'm authenticated properly, however I'm having trouble sending a file. (It is an MP3). Cheers
×
×
  • 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.