exec-sum : introducing a new URL notation scheme
2 examples :
example 1 :
http://localhost/tarot(deck'Original-Rider-Waite
',reading'3-Cards')/music(youtubePlaylist'ABCDEFG')
parameters decoded from the current website location (URL) =
array(2) {
["tarot"]=>array(2) {
["deck"]=>string(20) "Original-Rider-Waite"
["reading"]=>string(7) "3-Cards"
}
["music"]=>array(1) {
["youtubePlaylist"]=>string(7) "ABCDEFG"
}
}
http://localhost/jsonViewer(url'base64aHR0cDovL3NlZHVjdGl2ZWFwcHMuY29tL2pzb24ucGhwP2ZpbGU9L2hvbWUvcmVuZS9kYXRhLmpzb24mdmVyc2lvbj1jb25kZW5zZWQ=
')
parameters decoded from the current website location (URL) =
array(1) {
["jsonViewer"]=>array(1) {
["url"]=>string(76)
"http://seductiveapps.com/json.php?file=/home/rene/data.json&version=condense"
}
}
for more details, see :
https://forums.digitalpoint.com/threads/introducing-a-new-
url-notation-scheme.2797191/
due to mailinglist limitations, i can not repost the content here.
but you are most welcome to comment on it here, i'll check my mail in about
12 hours from now.
exec-sum : introducing a new URL notation scheme
I'm not at all sure what you're trying to achieve here, and if you wanted this to be widely adopted, I think you're about 30 years too late.
What is the "elevator pitch" for this syntax? Why would I choose your syntax over the long-established "?foo=bar&baz=quux" syntax?
example 1 :
http://localhost/tarot(deck'Original-Rider-Waite
',reading'3-Cards')/music(youtubePlaylist'ABCDEFG')
In PHP, you will get your desired result using http://localhost/?tarot [deck]=Original-Rider-Waite&tarot[reading]=3-Cards&music[youtubePlaylist]=ABCDEFG
It's slightly more verbose if you have lots of items in one array, but has the crucial advantage that you can use standard HTML forms to generate it.
http://localhost/jsonViewer(url'base64aHR0cDovL3NlZHVjdGl2ZWFwcHMuY29tL2pzb24ucGhwP2ZpbGU9L2hvbWUvcmVuZS9kYXRhLmpzb24mdmVyc2lvbj1jb25kZW5zZWQ=
Using base64 in URLs is already quite common; there's no standard way of annotating it to be automatically decoded, but creating a convention in your own application is not difficult - normally as simple as "this field is always base64, everything else never is".
Maybe I'm missing something, but your linked post doesn't seem to give anything more than these same examples. And since this is the mailing list for developing the internals of the PHP language, what is it you think should be added to the language for this?
Regards,
--
Rowan Collins
[IMSoP]
On Wed, Mar 1, 2017 at 3:30 PM, Rene Veerman <
rene.veerman.netherlands@gmail.com> wrote:
exec-sum : introducing a new URL notation scheme
2 examples :
example 1 :
http://localhost/tarot(deck'Original-Rider-Waite
',reading'3-Cards')/music(youtubePlaylist'ABCDEFG')parameters decoded from the current website location (URL) =
array(2) {
["tarot"]=>array(2) {
["deck"]=>string(20) "Original-Rider-Waite"
["reading"]=>string(7) "3-Cards"
}
["music"]=>array(1) {
["youtubePlaylist"]=>string(7) "ABCDEFG"
}
}http://localhost/jsonViewer(url'base64aHR0cDovL3NlZHVjdGl2ZWFw
cHMuY29tL2pzb24ucGhwP2ZpbGU9L2hvbWUvcmVuZS9kYXRhLmpzb24mdmVy
c2lvbj1jb25kZW5zZWQ=
')parameters decoded from the current website location (URL) =
array(1) {
["jsonViewer"]=>array(1) {
["url"]=>string(76)
"http://seductiveapps.com/json.php?file=/home/rene/data.
json&version=condense"
}
}for more details, see :
https://forums.digitalpoint.com/threads/introducing-a-new-
url-notation-scheme.2797191/due to mailinglist limitations, i can not repost the content here.
but you are most welcome to comment on it here, i'll check my mail in about
12 hours from now.
Is there even a thesis statement to this discussion?