Millisecond Forums

HTML Element Connects to Website Twice

https://forums.millisecond.com/Topic29196.aspx

By Connorrr - 6/9/2020

Hi,

I have a website set up that sends an sms to a mobile number when it is accessed.  I have my HTML element set up like this in inquist:

<html pingsite>
/ items = ("http://mywebsite.com.au/sendsms.php?currenttime=<%script.currenttime%>&mobilenumber=test")
</html>

This connects to the site just fine but when I check the logs on the website it appears that running this once will result in the script accessing the site twice in quick succession.  This is an issue since it will attempt to send the sms twice at this point.  Do you have any idea why this would be happening?

Thank you.
By Dave - 6/9/2020

Connorrr - 6/10/2020
Hi,

I have a website set up that sends an sms to a mobile number when it is accessed.  I have my HTML element set up like this in inquist:

<html pingsite>
/ items = ("http://mywebsite.com.au/sendsms.php?currenttime=<%script.currenttime%>&mobilenumber=test")
</html>

This connects to the site just fine but when I check the logs on the website it appears that running this once will result in the script accessing the site twice in quick succession.  This is an issue since it will attempt to send the sms twice at this point.  Do you have any idea why this would be happening?

Thank you.

No idea. And posting the HTML element in isolation is not sufficient to say anything more.
By Dave - 6/9/2020

Dave - 6/10/2020
Connorrr - 6/10/2020
Hi,

I have a website set up that sends an sms to a mobile number when it is accessed.  I have my HTML element set up like this in inquist:

<html pingsite>
/ items = ("http://mywebsite.com.au/sendsms.php?currenttime=<%script.currenttime%>&mobilenumber=test")
</html>

This connects to the site just fine but when I check the logs on the website it appears that running this once will result in the script accessing the site twice in quick succession.  This is an issue since it will attempt to send the sms twice at this point.  Do you have any idea why this would be happening?

Thank you.

No idea. And posting the HTML element in isolation is not sufficient to say anything more.

Here's something to try, on a hunch. Set the <html> element to not erase, make it small, and display it off-screen.

<html pingsite>
/ items = ("http://mywebsite.com.au/sendsms.php?currenttime=<%script.currenttime%>&mobilenumber=test")
/ size = (0%, 0%)
/ position = (-10%, -10%)
/ erase = false
</html>

If that doesn't do the trick, you may be able to do something with your SMS sending logic server-side to prevent multiple SMS going out to the same number within a short time span.

By Connorrr - 6/9/2020

Dave - 6/10/2020
Connorrr - 6/10/2020
Hi,

I have a website set up that sends an sms to a mobile number when it is accessed.  I have my HTML element set up like this in inquist:

<html pingsite>
/ items = ("http://mywebsite.com.au/sendsms.php?currenttime=<%script.currenttime%>&mobilenumber=test")
</html>

This connects to the site just fine but when I check the logs on the website it appears that running this once will result in the script accessing the site twice in quick succession.  This is an issue since it will attempt to send the sms twice at this point.  Do you have any idea why this would be happening?

Thank you.

No idea. And posting the HTML element in isolation is not sufficient to say anything more.

Hi Dave,

The HTML element can be run in isloation but even when it is run in block, trial structure like this:

<text testInstructions>
/ items = ("This is a test")
/ fontstyle = ("MS Shell Dlg 2", 1.76%, false, false, false, false, 5, 1)
/ color = black
/ size = (50, 50)
/ position = (50, 50)
</text>

<html pingsite>
/ items = ("http://mywebsite.com.au/sendsms.php?currenttime=<%script.currenttime%>&mobilenumber=test")
</html>

<trial pingsitetrial>
/ stimulustimes = [500 = pingsite]
/ timeout = 1000
</trial>

<trial instrTrial>
/ stimulustimes = [0 = testInstructions]
/ timeout = 2000
</trial>

<block block>
/ trials = [1 = instrTrial; 2 = pingsitetrial]
</block>

It still connects to the site twice.  Looks like I might have to work something out server side.

Thanks.
By Dave - 6/9/2020


Our posts crossed:
https://www.millisecond.com/forums/FindPost29198.aspx
By Connorrr - 6/9/2020


Thanks for that, Dave.  I just gave it a try but the same issue occurred.  I'll have a few more play arounds with the inquisit parameters and see if I can get something working otherwise I'll look at sorting something out in the php code.  Thanks for your help.