Jump to content

nitiphone2021

Members
  • Posts

    78
  • 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 created a API authen by sanctum and it's work when I send logout by php artisan serve but when i close it and use xampp http://localhost/Laravel/laravel2/api/logout it's said "Unauthenticated" Why it work only on artisan serve?
  2. I have a table include column name license_plate(String),car_bike(1 or 2),price,create_date I would like to create a report about income for system I try as below command SELECT DATE(create_date) as Park_Date,car_bike,price,COUNT(car_bike) * price as income from 1_tb_parking group by Park_Date,car_bike I would like to get result like this date, car_bike = 1, count(car_bike=1),sum(price for car_bike = 1) as sum1, car_bike = 2, count(car_bike=2),sum(price for car_bike = 2) as sum2, Total = sum1 + sum2 Do you have any idea?
  3. I am planing to develop a Delivery App like foodpanda, from starting I think the customer not too much but I want to know the technology for it that we can upgrade it after the customer increase
  4. Oh, Seem my question is not clear, I mean I make a POS online software and sell it to many shop, so how can I saperate shop information, shop name, stock, login info....
  5. Dear friends. As I would like to create a software like POS on web application. my question is: 1. Should I create only one Database for all customers? 2. in case I have only one Database, How can I saperate the customer information? by field or table name? 3. if I have new customer. I need to create new table or information for them?
  6. 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
  7. But I want to send them some notify when the user is not open the browser. How can i send to it?
  8. 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?
  9. 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
  10. 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
  11. 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) { } }); }
  12. 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 . "]";
  13. //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.
  14. 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?
×
×
  • 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.