I currently got a service which can send text messages to mobiles and works with a URL, e.g. http://domain.com/sms.txt?n=+34666000500&m=test.
I'm going to design a system where a user logs in and can type a message out and click send and it goes to the URL above (It's going to be going to more than one phone), however, I don't want the user to see this URL; what can I do to hide it?
Furthermore, when you go to the URL I stated above you get a message, e.g: 1 OK, 2 OK, 3 OK, 4 BAD (In this case you are going to send it to four mobiles). Is there any way I can stop the user seeing this messages on the other website but instead I want a user to see my message, on my website saying, 3 sms were sent out ok, 1 was bad?
Thanks!
[SOLVED] Designing a new system
Moderator: General Moderators
[SOLVED] Designing a new system
Last edited by Devnull on Fri Aug 05, 2005 9:50 am, edited 1 time in total.
In that case your script is not performing the request.. But you are simply redirecting him..
Instead do something like: (Here i use the HTTP(S) wrapper, but you could also use curl, snoopy, simpletest browser, ...)
feyd |
Instead do something like: (Here i use the HTTP(S) wrapper, but you could also use curl, snoopy, simpletest browser, ...)
Code: Select all
$result = file_get_contents('http://someotherhost.example.org?userid=foo&message=bar');
if ($result == '01 OK')
{
$message = 'Everything went well.........';
}
echo $resultfeyd |
Cool, that's helped me out. Could you givce me an example using Curl ?timvw wrote:In that case your script is not performing the request.. But you are simply redirecting him..
Instead do something like: (Here i use the HTTP(S) wrapper, but you could also use curl, snoopy, simpletest browser, ...)
$result = file_get_contents('http://someotherhost.example.org?userid=foo&message=bar');
if ($result == '01 OK')
{
$message = 'Everything went well.........';
}
echo $result