openhub.net
Black Duck Software, Inc.
Black Duck Open Hub
Follow @
OH
Sign In
Join Now
Projects
People
Organizations
Tools
Blog
BDSA
Projects
People
Projects
Organizations
Forums
M
mathiasbynens's php-url-shortener
Settings
|
Report Duplicate
0
I Use This!
×
Login Required
Log in to Open Hub
Remember Me
Inactive
Commits
: Listings
Analyzed
1 day
ago. based on code collected
1 day
ago.
Apr 24, 2023 — Apr 24, 2024
Showing page 1 of 2
Search / Filter on:
Commit Message
Contributor
Files Modified
Lines Added
Lines Removed
Code Location
Date
README: Tweak bookmarklets
Mathias Bynens
More...
over 6 years ago
README: Clarify that the `INSERT` statement is there for a reason
Thomas Steiner
More...
over 6 years ago
Add nginx.conf
Rutger Laurman
More...
about 7 years ago
Update placeholder values to encourage HTTPS usage
Mathias Bynens
More...
over 9 years ago
Use HTTPS Twitter URLs by default
Mathias Bynens
More...
over 9 years ago
Prevent XSS attacks introduced by 213a24a1
Mathias Bynens
More...
over 10 years ago
Remove GPL license
jaymz
More...
over 10 years ago
Avoid re-shortening URLs
Mathias Bynens
More...
over 10 years ago
Use MySQL’s `utf8mb4` instead of `utf8`
Mathias Bynens
More...
almost 11 years ago
Dual license this code under the MIT and GPL licenses
Mathias Bynens
More...
about 11 years ago
README: Add Tomislav Biscan as a contributor
Mathias Bynens
More...
almost 12 years ago
Order by date and by slug, to handle the edge case where the last two entries have the same date
Tomislav Biscan
More...
almost 12 years ago
Update example `GOOGLE_PLUS_ID` to match my new G+ account.
Mathias Bynens
More...
over 12 years ago
Typo in README: `@` and `+` are still ignored in slugs that contain other characters.
Mathias Bynens
More...
almost 13 years ago
Redirect http://example.org/@ to a specified Twitter profile.
Mathias Bynens
More...
almost 13 years ago
Redirect http://example.org/+ to a specified Google+ profile.
Mathias Bynens
More...
almost 13 years ago
Use `(function() {}());` instead of `(function() {})();`.
Mathias Bynens
More...
almost 13 years ago
Minify fallback HTML as much as possible (for proxies that strip the `Location` HTTP headers) as it’s sent with every request.
Mathias Bynens
More...
almost 13 years ago
Use shorter but more readable variable names.
Mathias Bynens
More...
almost 13 years ago
Rename database-related constants, as suggested by @beverloo.
Mathias Bynens
More...
almost 13 years ago
Apply @beverloo’s advice as much as possible.
Mathias Bynens
More...
almost 13 years ago
Merge pull request #4 from beverloo/patch-1
Mathias Bynens
More...
almost 13 years ago
- "require" is a PHP language construct and thus should not use parenthesis. - Every code path ends with a call to redirect(), no need to have this as a function (also fixes issue #3). - Your usage of rtrim() on the slug is weird at best. I'm guessing that you want to filter these characters out. This version only allows characters and numbers. - The redirect to Twitter uses the unescaped request URI. Tweets with an ID < 10m are rare enough to disregard (filters out false positives). - Your database-related constants are named oddly. You're connecting to *MySQL* through the *MySQLi* interface. It's still the MySQL username. - "SET NAMES" is deprecated in favor of the set_charset member function. - You escape the $slug variable twice (trice when there's a hit). It's not like that's going to make it any safer. - You should never use backticks around field and table names in a MySQL query. It's a bit eeeuw. - The hit-counter can perfectly be within the conditional code. No need to break functionality if we can't update. - Always shut down the database connections you open. This also cleans up used query memory. - Provide some fallbacks for proxies which filter out redirects; (1) a <meta> refresh to the designated URL (2) a JavaScript-based redirect, in try/catch for origin reasons. (3) a text-link for those that still fail.
Peter Beverloo
More...
almost 13 years ago
Since it will now show an error message, we can rewrite `/shorten` to `shorten.php` as well.
Mathias Bynens
More...
over 13 years ago
Show error message when no `url` parameter was passed to shorten.php.
Mathias Bynens
More...
over 13 years ago
Drop the .php extension, i.e. rewrite shorten?PARAMS to shorten.php?PARAMS.
Mathias Bynens
More...
over 13 years ago
Don’t rewrite the URL used to shorten URLs.
Mathias Bynens
More...
over 13 years ago
Small README modifications.
Mathias Bynens
More...
over 13 years ago
Add QSA flag and some conditions for the main rewrite (short URL → full URL).
Mathias Bynens
More...
over 13 years ago
Got rid of some more bloat.
Mathias Bynens
More...
over 13 years ago
←
1
2
→
This site uses cookies to give you the best possible experience. By using the site, you consent to our use of cookies. For more information, please see our
Privacy Policy
Agree