Jump to content

nitiphone2021

Members
  • Posts

    78
  • Joined

  • Last visited

Everything posted by nitiphone2021

  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?
  15. 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?
  16. Now It fixed by install mdstring extension. Thank you very much
  17. 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
  18. 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
  19. 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*/
  20. 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
  21. the main target is I have a old software would like to use it and when I install. I got a error message about Fatal error: Call to undefined function mysql_query() in /home/newlinkbdbcom/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 613 so that's why i created a new test file for create a sample connect to test service can work
  22. Fatal error: Call to undefined function mysql_connect() in /home/newlinkbdbcom/public_html/app/webroot/test.php on line 5 $link = mysql_connect('localhost:3306', 'user', 'password','dbname'); still error again. it's about mysql driver or sometime?
  23. According to I have a project need to use PHP 5.6.40 connect to mysql version 5.7.34 This URL for phpinfo() http://newlink.bdb.com.la/app/webroot/test.php when I try to connect it by below coding $servername = "localhost"; $username = "user"; $password = "pass"; $db_database = 'db_unelr'; $db_port = '3306'; // Create connection $conn = mysqli_connect($servername, $username, $password,$db_database,$db_port); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully"; it's show 500 internal error. what should I check and fix this problem? it's private host, so I can run linux command to check
  24. Warning: Illegal string offset 'file' in /var/www/html/NlLaosF/cake/libs/debugger.php on line 632 Warning: Illegal string offset 'line' in /var/www/html/NlLaosF/cake/libs/debugger.php on line 632 Strict Standards: Non-static method Configure::read() should not be called statically in /var/www/html/NlLaosF/cake/basics.php on line 213 Strict Standards: Non-static method Configure::getInstance() should not be called statically in /var/www/html/NlLaosF/cake/libs/configure.php on line 156 Warning (2): fopen(../../app/webroot/lang/lang_en.php) [function.fopen]: failed to open stream: No such file or directory [APP/app_controller.php, line ??] Warning: Illegal string offset 'file' in /var/www/html/NlLaosF/cake/libs/debugger.php on line 632 Warning: Illegal string offset 'line' in /var/www/html/NlLaosF/cake/libs/debugger.php on line 632 Warning (2): fwrite() expects parameter 1 to be resource, boolean given [APP/app_controller.php, line ??] Warning: Illegal string offset 'file' in /var/www/html/NlLaosF/cake/libs/debugger.php on line 632 Warning: Illegal string offset 'line' in /var/www/html/NlLaosF/cake/libs/debugger.php on line 632 Warning (2): fclose() expects parameter 1 to be resource, boolean given [APP/app_controller.php, line ??] Warning (2): require_once(../../app/webroot/lang/lang_en.php) [function.require-once]: failed to open stream: No such file or directory [APP/app_controller.php, line ??] Fatal error: require_once() [function.require]: Failed opening required '../../app/webroot/lang/lang_en.php' (include_path='.:/usr/share/php:/var/www/html/NlLaosF:/var/www/html/NlLaosF/app/') in /var/www/html/NlLaosF/app/app_controller.php on line 0 This is the error message
×
×
  • 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.