Thursday 14 May 2020

QR Code Reader API | Using PHP And Linux OS And Xampp | Khanamiryan Github




QR Codes for testing


You can now download a whole API With VENDOR from:
https://unpossiblepog.com/codes/PHP/KHANAMIRYAN-QR-Code-Reader-For-PHP-version-7.2-And-Onward-With-Composed-Library

Please avoid or flag spams/hateful comments. And do not spam. Enjoy :)
------------------------------------------------

QR Code Github link:-
https://github.com/khanamiryan/php-qrcode-detector-decoder

GD library commands :- (first try without running those commands)
sudo apt-get install php5-gd
sudo apt-get install php7.0-gd
 sudo apt-get install php7.1-gd
sudo apt-get install php7.2-gd

LUBUNTU : Install, Launch & Uninstall Xampp | Install Sublime Text | Complete PHP Configuration:-
https://youtu.be/X09awd5Q8Bk

Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1

Facebook Page:-
https://www.facebook.com/UnpossibleNS

Twitter Account:-
https://twitter.com/UnpossiblePOG

Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------

Hey guys.
In this video, you will learn how to integrate QR code reader on website using PHP.
In this case, I will be using khanamiryan’s github package because people on internet claims that
it is the purest form of QR Code reader.
(Link in the description.)
Requirement is any linux from Debian family with xampp installed and php version better than 5.6.
Download the package.
Put that in htdocs folder of xampp, extract it.
Make sure to change permission to make it editable for everyone.
Rename it if you want to.
Inside that folder, there is a readme file which provides same steps as given below in github link.
So go back to htdocs folder and open qr code’s folder in terminal.
Install composer by tying this command. --> sudo apt install composer
Then enter your password.

Now, I provided in descriptions, 4 commands of installing GD library for each PHP versions from 5.6 to 7.2.
I suggest you to skip installing GD library, and install only if the main command gives you an error.
Now I shall be executing main command as they described by copy-pasting it in terminal.
Now if you check inside folder, there is vendor folder downloaded.
I shall be creating index.php file in main folder.
Lets check if it is working.
Now add PHP tag and paste the code they provided.
echo the text variable.
Now I have some QR code images, I shall paste them in our folder.( I shall provide them in blog link given in description.)
And paste the file name here.
Now, if you execute, there will be an error like Class QrReader not found.
So to fix it, rename function as this. (Zxing\QrReader).
And now if you execute, it will display content hidden inside QR code.
Lets try different QR code.
Don’t forget to like, share and subscribe.
Thanks for watching. 


Monday 4 May 2020

Google Sheet API | Part 3 | Delete Records From Spreadsheet | Remove Row...



Download VENDOR Folder (Only for PHP version 7.2+): https://unpossiblepog.com/research-and-development/php/Vendor-Folder-For-Google-Sheet-Drive-Calendar-With-PHP-Version-7.2-And-Onward

code :-

$requests = [
  new Google_Service_Sheets_Request([
      'deleteDimension' => [
          'range' => [
              'sheetId' => '0',
              'dimension' => 'ROWS',
              'startIndex' => 8,
              'endIndex' => 9
          ]
      ]
  ])
];

$batchUpdateRequest = new Google_Service_Sheets_BatchUpdateSpreadsheetRequest([
    'requests' => $requests
]);

$response = $service->spreadsheets->batchUpdate($spreadsheetId, $batchUpdateRequest);
print_r($response);



------------------------------------------------

Please avoid or flag spams/hateful comments. And do not spam. Enjoy :)
------------------------------------------------

Google Sheet API | Part 1 | Connect And Display Sheet Data Using PHP | Latest:-
https://youtu.be/CI0xL93Xtpg

Google Update New Configuration :-
https://youtu.be/5COjnEc4d9E

DELETING ROW IMP Link #1:-
https://developers.google.com/sheets/api/samples/rowcolumn#delete_rows_or_columns

DELETING ROW IMP Link #2:-
https://developers.google.com/sheets/api/guides/batchupdate#example

Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1

Facebook Page:-
https://www.facebook.com/UnpossibleNS

Twitter Account:-
https://twitter.com/UnpossiblePOG

Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------

Hey guys.
This is the video of Deleting Rows in Google Sheet using API.
First, if you don’t know how to connect google sheet with PHP, then watch both videos.
Links of those tutorials are given in description.
Now, as you can see, the current code I have is to display data from google sheet on browser.
Also, I provided two links which are important for deleting rows.
First link is to understand the array structure for deleting.
Second link is a PHP code that we have to implement.
Now In a code, make sure that the scope is SPREADSHEETS and not SPREADSHEET_READONLY
Here, comment the code which fetches the data.
Copy the code from top up to response variable.
Paste it just below spreadsheetID variable.
Now, we actually need one GOOGLE SERVICE SHEETS REQUEST. So remove the second but be careful not to mess the structure.
We also don’t need FIELDS sub-array.
Open the array structure link.
So according to this, the first parent should be “requests” which is already given in code.
So we don’t need to change it.
The second parent is “DELETE DIMENSION”. Paste it.
Third is “RANGE”.
Now RNAGE has 4 key value pairs, so paste them one by one.
Now, the first key which is sheetID is not same as spreadsheetID.
But rather it is sub-sheet.
And it is denoted as GID which you can find in URL.
In my case, the GID is 0.
Now we are deleting rows, so paste ROWS.
Now in spreadsheet, there are numbers which are actual index that we are going to use.
Make sure not to use any quotes, just type numbers.
Also a side note is, startIndex 8 means it does not delete the 8th row, deleting will start
from 9th row up to 10th row.

So if we refresh and check sheet, you see that data from row 9 and 10 are deleted and the
rest were moved upward by 2 positions.
If you want to delete only 1 row that is 9th row, then type 9 at END-INDEX and type 8 at
START-INDEX.

Now the 9th row is deleted.
You can also copy the whole code from blog link which is given in the description.

Don’t forget to like, share and subscribe.
Thanks for watching.