Open stemo40 opened 2 weeks ago
Ok,
So, I think I know what is happening. Instead of:
$qrcode = new QRCode('WIFI:S:'.$ssid.';T:'.$auth.';P:'.$pass.';;');
I changed it to:
$data = "WIFI:S:$ssid;T:$auth;P:$pass;";
$qrcode = new QRCode($data);
And it worked! So, I think the key is to use double quotes instead of separating variables with single quotes.
So, problem solved. Again, thanks for a great class! Steve
Hi,
This is a wonderful system with great results. Thank you!
The problem I am having is when using this class to generate a WiFi QR code. The result doesn't work because the password is missing. I used the below code:
The result I got was this:![image](https://github.com/nguyenary/QRCodeMonkey/assets/7620526/be05bfa9-badf-43b0-9f3d-921a2b04a666)
However, when I do a straight cURL Post call to the API, the result includes the password and works perfectly. Here's the post fields included in the cURL call:
{"data":"WIFI:S:My-Guest-Wifi;T:WPA;P:APassWord;","size":600,"download":true}
So, am I doing something wrong in the code? There are no examples here on how to do WiFi QR codes, so I had to look at the how it was done on the qr-code-monkey website by looking at their JS file. But, since it works using cURL, I am guessing that there might be something happing with this class.
Any help is appreciated. Steve