functions – Custom route and extract data from slashes and parameter

Question

some external website is going to send a specific data into a WordPress site and need to extract and process it. The data is coming trough URL (between slashes and as parameter):

domain.com/login_sso/username/timestamp/token?redirect=some-data

I need to create some script that listens to that URL domain.com/logun_sso/ and extracts the username, timestamp, token and redirect parameter.

Something like, when somebody hits domain.com/login_sso/ extract some data between slashes and paramter. I figured out to extract the parameters with parse_url but I don’t know if is the best way

Any ideas? I need some orientation here. Thank you.

0
Dani Pereyra 3 weeks 2021-11-09T06:29:43-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse