Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $endPoint = "https://www.freelancer.com/api/projects/0.1/bids/";
- $vars = array("project_id"=>18171040,"bidder_id"=> 14541573,"amount"=>18,"period"=>10,"milestone_percentage"=>100);
- // $varString = http_build_query($vars);
- // echo $varString;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $endPoint);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,$vars); //Post Fields
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- // curl_setopt($ch, CURLOPT_HEADER, true);
- $headers = [
- 'freelancer-oauth-v1: [code_here]',
- 'content-type: "multipart/form-data"'
- ];
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $server_output = curl_exec ($ch);
- curl_close ($ch);
- print_r (json_decode($server_output, true)) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement