Jump to content

Recommended Posts

Hi there,

 

I'm not that experienced with using GET, I've only used it in HTML to send data to a query string and in PHP to read data from a query string into variables.  So the following instructions from the provider of a messaging service that we subscribe to really have me puzzled.

 

I've no problem with using GET or POST to send the required input fields to the server but when it comes to receiving the second list of paremeters back, I'm lost.  Can anyone help?

 

Thanks in advance,

 

Paul.

 

Here's what the service provider's manual has to say:

 

 

You can poll the server for incoming messages:

 

Clients can GET incoming messages from http://service.bulletinconnect.net/api/1/sms/in.

 

Required Input parameters are:

 

  • userId
  • password

 

You may pass these parameters to the server in a query string, or in the HTTP Authorization header in Basic format.

 

The server will return a form encoded parameter list containing message information as described here:

 

  • messageId
  • Source MSISDN
  • Destination MSISDN
  • rateCode
  • inReplyToId
  • Correlation ID
  • body

 

N.B. The order of the parameters may change so use value/pair matching rather than location mapping.

Link to comment
https://forums.phpfreaks.com/topic/50156-help-with-get/
Share on other sites

it means that the variables you require will have those names - so just use $_GET as you normally do and use those variable names in the second list to reference the correct values.

 

location mapping is where you may get a delimted set of info like yes/no/green/holiday.

 

you could map those into 4 variables using their position in the string... but these guys warn that the order may change so don't use the mapping method.

Link to comment
https://forums.phpfreaks.com/topic/50156-help-with-get/#findComment-246295
Share on other sites

Hi ToonMariner,

 

Nice to hear from Newcastle.  I went to uni there but now live in Edinburgh.

 

I'm afraid I still need a bit more of a point in the right direction though.  I created a form with the GET method and the url supplied by the service provider as the action.  When I submit the userID and password parameters to the server with this form, my browser is offered a data file to download.  I'm sure that this data is not intended to be downloaded in a file but is really meant to be interpreted by $_GET.

 

My problem is that by using the GET method, the browser is directed to the action url, but in order to make use of the data sent back by the action url, i need to be browsing to a location where my php page can use GET to interpret this data. 

 

Do I need some way to submit the input parameters to the service provider's url but then direct the browser (and the returned data) to a php page that can use $_GET to interpret the output data?

 

Sorry if this doesn't make much sense.  I might be way off track with some of the concepts here.

 

Yours,

Paul.

Link to comment
https://forums.phpfreaks.com/topic/50156-help-with-get/#findComment-246539
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.