Andy
Andy

Reputation: 2140

CakePHP - accepting arguments from the URL

I am working with an external API that needs to call a URL in the form:

http://mysite/ussd/start?msisdn=123123123&provider=MTN

Where start is the controller method.

I am fully aware of the format in sending parameters like this:

http://mysite/ussd/start/msisdn=123123/test=2

but the other company is unable to change the format that they call the URL in.

How can I set Cake up to accept parameters in the format above?

Upvotes: 0

Views: 86

Answers (1)

Justin John
Justin John

Reputation: 9616

You can use $this->params['url']['msisdn'] and $this->params['url']['provider'] here. You can read about Controller parameters from cake manuals.

Upvotes: 2

Related Questions