Open Page as hidden, Open new page |
Open Page as hidden, Open new page |
Freshman |
Dec 25 2018, 04:46 AM
Post
#1
|
Newbie Group: Members Posts: 12 Joined: 19-December 18 Member No.: 26,776 |
Hi all,
I have a line of code that sends a SMS to a Mobile number. Problem is that it opens a page to do that, so it navigates away from the page I'm on. So I want it to do it's thing and then come back to the page I was on. I was wondering it there is a way to open a page "silently" or hidden or if there is a way to navigate to a site and wait a while and then come back. Here is the code: CODE header('Location: http://www.mymobileapi.com/api5/http5.aspx?Type=sendparam&username=$User&password=$Pass&numto=' . $getcell . '&data1=Test123; exit; If I add a second line header('Location: index.php'); then it does come back to the index page but it does not send the SMS. I tried adding a sleep command inbetween but still not sending the sms then The other problem is that if it open the mymobileapi page it also shows the username and password in clear text. So it would have also been nice to hide that but the site is a 3rd party site so I don't have any control over it unless I can add something to the Header command to hide the URL?? Thanks a lot |
CharlesEF |
Dec 25 2018, 01:15 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
If you want to send the SMS and stay on the same page then you need to use either 'ajax' or a 'promise'.
|
Lo-Fi Version | Time is now: 3rd June 2024 - 04:15 PM |