Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $json =
  2. '{"content" : "'.addslashes(chunk_split(base64_encode($file_contents))).'"}'
  3.  
  4. // create the object
  5. $obj = array(
  6. "content" => chunk_split(base64_encode($file_contents))
  7. );
  8. // encode the object in JSON format
  9. $json = json_encode($obj);
  10.  
  11. "image" :"${new BASE64Encoder().encode(data).replaceAll("[nr]", "")}"
  12.  
  13. // create the object
  14. $obj = array(
  15. "content" => base64_encode($file_contents)
  16. );
  17. // encode the object in JSON format
  18. $json = json_encode($obj);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement