Presto-X Posted October 7, 2008 Share Posted October 7, 2008 Hello every one, I'm working on a API for a payment gatway, I'm having some truble getting a echo from a GET to work. This is what the URL looks like: http://www.XXXXXXXXXX.com/index.php?option=com_courses&?ssl_card_number=XX********XXXX&ssl_exp_date=XXXX&ssl_amount=365.00&ssl_customer_code=4618& The problem is, when the customer is returned to our site the payment gateway site adds a ? at the beganning of the url so is there a way that I can explode the link and get the content from the ssl_card_number section of the url? I have tested this by changing the ? in to a & and it works great! Link to comment https://forums.phpfreaks.com/topic/127334-please-help-get-not-working/ Share on other sites More sharing options...
Presto-X Posted October 7, 2008 Author Share Posted October 7, 2008 Ok so I started playing around with this code and I can start to get it to work echo substr(strrchr($_SERVER['REQUEST_URI'],'?ssl_card_number='),17); This will display this: XX********XXXX&ssl_exp_date=XXXX&ssl_amount=365.00 Is there a way to get the above code to stop at the next & sign so it would only display XX********XXXX Link to comment https://forums.phpfreaks.com/topic/127334-please-help-get-not-working/#findComment-658715 Share on other sites More sharing options...
Third_Degree Posted October 7, 2008 Share Posted October 7, 2008 $split = explode( "&", $str); That's the string manipulation you want I think, but I would advise not to be putting such sensitive information through GET. Link to comment https://forums.phpfreaks.com/topic/127334-please-help-get-not-working/#findComment-658716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.