Jump to content

nitiphone2021

Members
  • Posts

    72
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

nitiphone2021's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

1

Community Answers

  1. According to I would like to try to use JWT for my PHP and these are my step on domain/app/ composer require firebase/php-jwt so I have domain/app/login.php domain/app/vendor/firebase/... and on the login.php try{ echo "1"; require_once('vendor/autoload.php'); use firebase\JWT\JWT; echo "2"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } It's not show any thing and error "HTTP ERROR 500" I think the code is really find the autoload.php but I don't know why it's internet error on line use firebase\JWT\JWT; If I add this command, the PHP will be error 500
  2. But I want to send them some notify when the user is not open the browser. How can i send to it?
  3. According to I have a SOAP API send to a operator for SMS server and the operator they create API by PHP so I want to send a URL to them "https://covaf.gov.la/covaf-web/" But the operator always cut to be "https:covaf.gov.la/covaf-web/" I try /// but get only one / So Do you have any idea to get the URL as I want without get help from the operator?
  4. According to I create a mobile app by Flutter and I also build it to web base also. But I want to send some notify to mobile web browser to alert them come back to do sometask. I ever see it on other website but I don't know how to make it. Is it on PWA? Please guide me how can I make it like that
  5. As I install old PHP project and it's not work some feature from checked, it stuck on wget command $command = "wget -b -q -P public/logs/ '" . $url . "' " . LINK_URL_SSL; $output = shell_exec($command); This is the full command wget -b -q -P public/logs/ 'https://localhost/users/receiveToAll?user=5&transfer_order_id=10531&order_date=2021-07-04&receive_number=21TR&receive_date=04/07/2021&json=536038974_to_r_10531&pos=ud@y@ip@s' --no-check-certificate I check the $output is Continuing in background, pid 6224. so on the public/logs I don't find any file generate very long time, so I think this wget has something wrong. I try to run http://websitename/users/receiveToAll?user=5&transfer_order_id=10531&order_date=2021-07-04&receive_number=21TR&receive_date=04/07/2021&json=536038974_to_r_10531&pos=ud@y@ip@s it's work correctly
  6. But the file I created it's no sound, it's like empty file always 44K //this will print out the received name, temp name, type, size, etc. $input = $_FILES['audio_data']['tmp_name']; //get the temporary name that PHP gave to the uploaded file $output = "../management/design/voices/" . time() . uniqid() .".wav"; //letting the client control the filename is a rather bad idea //move the file from temp name to local folder using $output name $result = move_uploaded_file($input, $output); It is because the blob? This is th javascript function for save record function stopRecording() { //tell the recorder to stop the recording rec.stop(); //stop microphone access gumStream.getAudioTracks()[0].stop(); //create the wav blob and pass it on to createDownloadLink rec.exportWAV(createDownloadLink); } async function createDownloadLink(blob) { var filename = new Date().toISOString(); var fd=new FormData(); fd.append('audio_data', blob,filename); $.ajax({ url: "../func/upload.php", method: "POST", processData: false, contentType: false, data: fd, enctype: 'multipart/form-data', success: function (data) { console.log('SUCCESS' + data); }, error: function (err) { } }); }
  7. Now it's work. seem it's fail on $output because I just copy but don't change the path so this code is work //this will print out the received name, temp name, type, size, etc. $input = $_FILES['audio_data']['tmp_name']; //get the temporary name that PHP gave to the uploaded file $output = "C:\\xampp\htdocs\dlap\ABC.wav"; //letting the client control the filename is a rather bad idea //move the file from temp name to local folder using $output name $result = move_uploaded_file($input, $output); echo $output; echo "Result = [" . $result . "]";
  8. //this will print out the received name, temp name, type, size, etc. $input = str_replace(":","_",$_FILES['audio_data']['tmp_name']); //get the temporary name that PHP gave to the uploaded file $output = $_FILES['audio_data']['name'].".wav"; //letting the client control the filename is a rather bad idea //move the file from temp name to local folder using $output name $result = move_uploaded_file($input, $output); echo "Result = [" . $result . "]"; The result from these code is "Rsult = []" $input = $_FILES['audio_data']['tmp_name']; //get the temporary name that PHP gave to the uploaded file If I follow the original code by this line, The server will said file not found.
  9. According to I make a website for chat and I want to send voice to communicate. so I use this script from https://blog.addpipe.com/using-recorder-js-to-capture-wav-audio-in-your-html5-web-site/ This is javascript function createDownloadLink(blob) { //name of .wav file to use during upload and download (without extendion) var filename = new Date().toISOString(); console.log('bob = ' + typeof(blob)); console.log('file name = ' + typeof(filename)); var fd=new FormData(); fd.append("audio_data",blob, filename); $.ajax({ url: "../func/upload.php", method: "POST", processData: false, contentType: false, data: fd, enctype: 'multipart/form-data', success: function (data) { console.log('SUCCESS' + data); }, error: function (err) { } }); } and this is server side PHP <?php //this will print out the received name, temp name, type, size, etc. print_r($_FILES); $input = str_replace(":","_",$_FILES['audio_data']['tmp_name']); //get the temporary name that PHP gave to the uploaded file $output = $_FILES['audio_data']['name'].".wav"; //letting the client control the filename is a rather bad idea //move the file from temp name to local folder using $output name move_uploaded_file($input, $output); ?> This is the print output Array ( [audio_data] => Array ( [name] => 2021-07-02T07:59:33.877Z [type] => audio/wav [tmp_name] => C:\xampp\tmp\phpF3C8.tmp [error] => 0 [size] => 44 ) ) It seem no any error but I don't find any file on the server. Could you please kindly help me check?
  10. According to I want ot run a websocket for PHP and javasscript. and I have a private host on internet example 202.112.113.114 How can I basic use websocket on it? on client slide it's easy for copy some javascript's example but on Server side. what should I do? need to install by composer or any library?
  11. Now It fixed by install mdstring extension. Thank you very much
  12. Dear all, According to I install old project about cakePHP and I make some report but get a error about Server Internal error As I checked It's error about this code try{ $excelContent = chr(255).chr(254).@mb_convert_encoding($excelContent, 'UTF-16LE', 'UTF-8'); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } Do you have any idea about this code? I try to catch the error but it's not work
  13. Dear all, According to I create a website and I try to copy the URL to facebook for sharing but when post it. the post not show information about the website. I add meta but still not work. This is my website
  14. Dear all, Accoring to I created a soap API for sending SMS but timeout I found the server not reply. so I would like to protect the timeout case like retry or something. $requestmsg = array('msg'=>$msg); /* SEND SOAP API */ $result = $client->SendSMS($requestmsg); /* RESPONSE FROM SOAP API*/
  15. Dear friends, Now I create a chatbot and I set screen max 600 will show chatbox for full screen. it's work. it has Title, Message box and send message form. normally it will show all but when I try to put any message, the screen can't show title. Pleae look at my attached file for detail
×
×
  • 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.