0 votes
in SoSci Survey (English) by s273886 (125 points)

Hi all,

I am working on a study in which we would like to use the LOX24 SMS Gateway API in order to send our participants texts. The LOX24 API documentation on sending an SMS says that we need to use the curl_init() function in order to create the HTTP post request to trigger sending an SMS. However, when I copy their code snippet into a PhP block in the Compose Questionnaire editor, I get the following warning:

”Warning

Warning: The function curl_init() is disabled for the questionnaire.

Warning: The PHP code contains functions or PHP elements that you are not
permitted to use in the questionnaire. If you think that the constructs
in question are safe to use, please contact the administrator!”

The SoSci Survey has previously asked about how to get around this limitation of not being able to use the curl_init() function. This first post says that “If you use a local server, you can simply allow that function.” My university has their own SoSci Survey account, and it is possible that we have access to or already have a local server. If we didn’t, how could we set up a local server? Once we have a local server, how could we “allow that function”?

This second post says that “there will be some replacement in SoSci Survey soon” (of the curl_init() function). Has a replacement been made available? If not, is there a different function that we could use to create the HTTP post request to the LOX24 SMS Gateway API in order to send SMSs to our participants?

Thanks so much

1 Answer

0 votes
by SoSci Survey (305k points)

If you're working on a local server, you can simply enter the LOX24 credentials in the server settings, and send SMS like you send mailings, e.g., using mailSchedule().

If you're working on www.soscisurvey.de or s2survey.net, we offer sending SMS through the mailing feature over LOX24 for 0,10 € plus tax per SMS.

If you still wand to do it via API call directly, please use sendJSON(), which will take care of the communication.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...