[Solved] Uploading a file to Google Signed URL with PHP cURL

this is what you want: remove CURLOPT_POSTFIELDS altogether, and replace CURLOPT_CUSTOMREQUEST=>’PUT’ with CURLOPT_UPLOAD=>1 and replace ‘r’ with ‘rb’, and use CURLOPT_INFILE (you’re supposed to use INFILE instead of POSTFIELDS), $fp = fopen($_FILES[‘file’][‘tmp_name’], “rb”); curl_setopt_array($ch,array( CURLOPT_UPLOAD=>1, CURLOPT_INFILE=>$fp, CURLOPT_INFILESIZE=>$_FILES[‘file’][‘size’] )); This works when I had $file = fopen($temp_name, ‘r’); never use the r mode, always use the … Read more

[Solved] Mouse position with Ajax in PHP [closed]

You can use this code for getting mouse position and posting request: $(“#target”).mousemove(function(event) { $.post(“test.php”, {x: event.pageX, y: event.pageY}); }); If you need help with doing something with position in PHP, you can ask me. solved Mouse position with Ajax in PHP [closed]