MATLAB Answers

FIR
0

how to enter a number in url

Asked by FIR
on 16 Mar 2014
Latest activity Answered by Image Analyst
on 16 Mar 2014
I have a url in that i want to type a number ,the number varies each time,if i enter it manually it works for ex
url='http://103.250.30.5/SendSMS/sendmsg.php?uname=XXX&pass=XXX&send=Alerts&dest=123456789&msg=Out time is 18.28'
web(url,'-browser')
dest is my mobile number,if i enter manually it works but i have saved it in variable A how to enter it tere
kindly help

  0 Comments

Sign in to comment.

Tags

2 Answers

Answer by the cyclist
on 16 Mar 2014
 Accepted Answer

A = '123456789';
url=['http://103.250.30.5/SendSMS/sendmsg.php?uname=XXX&pass=XXX&send=Alerts&dest=',A,'&msg=Out time is 18.28']

  0 Comments

Sign in to comment.


Answer by Image Analyst
on 16 Mar 2014

You can use sprintf():
url=sprintf('http://103.250.30.5/SendSMS/sendmsg.php?uname=%d&pass=%d&send=Alerts&dest=123456789&msg=Out time is 18.28', number1, number2);
number1 and number2 replace the %d's in the format string.

  0 Comments

Sign in to comment.