Skip to content

Commit

Permalink
Change QR code provider (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
yakatz authored Apr 15, 2024
1 parent b876807 commit 76ed372
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/development/examples/qrcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ function ozh_yourls_qrcode( $request ) {
$keyword = yourls_sanitize_keyword( $matches[1] );
if( yourls_is_shorturl( $keyword ) ) {
// Show the QR code then!
header('Location: https://chart.apis.google.com/chart?chs=200x200&cht=qr&chld=M&chl='.YOURLS_SITE.'/'.$keyword);
// API documentation: https://goqr.me/api/doc/create-qr-code/
// Terms: Requesting IP and referrer are loged, but not requested QR data. Limit 10,000 requests per day.
header('Location: https://api.qrserver.com/v1/create-qr-code/?size=200x200&qzone=2&ecc=M&data='.YOURLS_SITE.'/'.$keyword);
exit;
}
}
Expand Down

0 comments on commit 76ed372

Please sign in to comment.