To begin with, I don’t want to allow my users to submit me their links that are dynamic. Contains the “?”. And so, how to check if url is dynamic or not ? Is there any builtin php function that checks for this ? Dynamic links, I mean.
@daveyerwinJul 14.2021 — #> @developer_web#1634138 To begin with, I don't want to allow my users to submit me their links that are dynamic. Contains the "?".
> And so, how to check if url is dynamic or not ? Is there any builtin php function that checks for this ? Dynamic links, I mean.
- - - - - - - - - - - - - - - allow or disallow based on the results of
@NogDogJul 14.2021 — #Note, however, that the lack of a query string does not mean it's not "dynamic". A RESTful link like https://example.com/autos/mercedes/black could be made to work exactly like https://example.com/autos.php?make=mercedes&color=black. 🤷♂️
@NogDogJul 15.2021 — #> @developer_web#1634180 So, how would you go about sorting this mess out then
I'd start by making darned sure it is actually a problem if a user provides a "dynamic" link. Is this really an issue, and if so, why? Do you not want users to post links to specific articles on a wordpress blog, but only to the home page of that blog -- because an article link is going to be a "dynamic" link.
Well, I did want to allow users like you to submit your dynamic links but before I accept such links I got to fix this code of Zorg's so the output is not in encoded format:
Now because I have failed to fix that code of Zorg's, I then thought "oh HELL! Let's quit accepting dynamic links at the beginning and just accept static links. And once this code is fixed ...
Or, you can fix your own code as Zorg suggests I use that instead. Fix it so no url gets echoed but a link. And most of all, explain to me your code there:
I thought they missed it on the day I made the post because they were busy with other threads. And so, a week or two later, I bump my threads to bring it to their attention, just incase they are free that day. Not busy with other threads on the bumping day, I mean.
@ballzopJul 26.2021 — #Generally speaking, they don't point to the same location. That would be a redirect and would cause the "real" URL (without any authentication protection on it) to be available to the client who could share it.
The server side code just picks the file off the file system and returns it directly (e.g. with readfile (don't forget to set the Content-Type header)).[.](https://tomzpot.com/)[.](https://mdro.fun/mobdro/)