Vous souhaitez développer une application en ASP qui permet d'envoyer des SMS ? Consultez nos exemples de codes pour chacune des fonctionnalités disponibles depuis notre API SMS.

				      			<%
										
										ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
										ENVOYER_SMS_PRO_LOGIN = ""
										ENVOYER_SMS_PRO_PASSWORD = ""
										
										url = ENVOYER_SMS_PRO_HOST & "/api/message/send/"
										str = "text=" & Server.URLencode("Nouveau message via l'API d'Envoyer SMS Pro depuis un script ASP") & "&recipients=" & Server.URLencode("33600000000") & "&sendername=" & Server.URLencode("SOCIETE")
										
										set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
										xmlhttp.open "POST", url, false
										xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
										xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
										xmlhttp.setRequestHeader "Content-Length", Len(str)
										xmlhttp.send str
										msg = xmlhttp.responseText
										'response.write(msg)
										Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
										' Load the specified XML file (returns XML output)
										xmlDoc.LoadXML(msg)
										' Parse XML
										if xmlDoc.parseError.errorcode <> 0 then
											Response.Write("XML Error...")
										else
											' get xml data
											set statusNode = xmlDoc.documentElement.selectSingleNode("status")
											if statusNode.text = "success" then
												Response.Write("Message envoyé : " & "
") Response.Write("Le messageid : " & xmlDoc.documentElement.selectSingleNode("message/message_id").Text & "
") Response.Write("Nombre de sms envoyé : " & xmlDoc.documentElement.selectSingleNode("message/sms_sent").Text & "
") Response.Write("Nombre de sms restant : " & xmlDoc.documentElement.selectSingleNode("message/sms_remaining").Text) else Response.Write("Impossible de créer le compte :
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
									
									ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
									ENVOYER_SMS_PRO_LOGIN = ""
									ENVOYER_SMS_PRO_PASSWORD = ""
									
									url = ENVOYER_SMS_PRO_HOST & "/api/message/stats/"
									str = "messageid=" & Server.URLencode("0")
									
									set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
									xmlhttp.open "POST", url, false
									xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
									xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
									xmlhttp.setRequestHeader "Content-Length", Len(str)
									xmlhttp.send str
									msg = xmlhttp.responseText
									'response.write(msg)
									Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
									' Load the specified XML file (returns XML output)
									xmlDoc.LoadXML(msg)
									' Parse XML
									if xmlDoc.parseError.errorcode <> 0 then
										Response.Write("XML Error...")
									else
										' get xml data
										set statusNode = xmlDoc.documentElement.selectSingleNode("status")
										if statusNode.text = "success" then
											Response.Write("Les statistiques du message : " & "

") Response.Write("Nombre de SMS délivré : " & xmlDoc.documentElement.selectSingleNode("stats/number_status_1").Text & "
") Response.Write("Nombre de SMS non délivré : " & xmlDoc.documentElement.selectSingleNode("stats/number_status_2").Text & "
") Response.Write("Nombre de SMS en attente chez l'opérateur: " & xmlDoc.documentElement.selectSingleNode("stats/number_status_3").Text & "
") Response.Write("Nombre de SMS en cours de traitement : " & xmlDoc.documentElement.selectSingleNode("stats/number_status_4").Text & "
") Response.Write("Nombre de numéro en STOP SMS : " & xmlDoc.documentElement.selectSingleNode("stats/number_status_5").Text & "
") Response.Write("
Statistiques détaillées :
") set nodeCol = xmlDoc.documentElement.selectNodes("stats/recipient") for each recipientNode in nodeCol Response.Write("
") Response.Write("Le " & recipientNode.selectSingleNode("mobile_number").Text) Select Case recipientNode.selectSingleNode("status_id").Text Case "1" Response.Write(" a reçu le SMS le " & recipientNode.selectSingleNode("delivered_date").Text) Case "2" Response.Write(" n'a pas reçu le SMS") Case "3" Response.Write(" est en attente chez l'opérateur") Case "4" Response.Write(" est en cours de traitement") Case "5" Response.Write(" est en STOP SMS") End Select Response.Write("
") next else Response.Write("Impossible de récupérer vos comptes :
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
										
								ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
								ENVOYER_SMS_PRO_LOGIN = ""
								ENVOYER_SMS_PRO_PASSWORD = ""
								
								url = ENVOYER_SMS_PRO_HOST & "/api/message/cancel/"
								str = "messageid=" & Server.URLencode("0")
								
								set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
								xmlhttp.open "POST", url, false
								xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
								xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
								xmlhttp.setRequestHeader "Content-Length", Len(str)
								xmlhttp.send str
								msg = xmlhttp.responseText
								'response.write(msg)
								Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
								' Load the specified XML file (returns XML output)
								xmlDoc.LoadXML(msg)
								' Parse XML
								if xmlDoc.parseError.errorcode <> 0 then
									Response.Write("XML Error...")
								else
									' get xml data
									set statusNode = xmlDoc.documentElement.selectSingleNode("status")
									if statusNode.text = "success" then
										Response.Write("Envoi annulé : " & "

") Response.Write("Messageid : " & xmlDoc.documentElement.selectSingleNode("message/message_id").Text & "
") Response.Write("Nombre de SMS recrédité : " & xmlDoc.documentElement.selectSingleNode("message/recredited_sms").Text & "
") Response.Write("Nombre de SMS restant : " & xmlDoc.documentElement.selectSingleNode("message/sms_remaining").Text & "
") else Response.Write("Impossible de récupérer vos comptes :
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
									
									ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
									ENVOYER_SMS_PRO_LOGIN = ""
									ENVOYER_SMS_PRO_PASSWORD = ""
									
									url = ENVOYER_SMS_PRO_HOST & "/api/account/getallaccounts/"
									str = ""
									
									set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
									xmlhttp.open "POST", url, false
									xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
									xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
									xmlhttp.setRequestHeader "Content-Length", Len(str)
									xmlhttp.send str
									msg = xmlhttp.responseText
									'response.write(msg)
									Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
									' Load the specified XML file (returns XML output)
									xmlDoc.LoadXML(msg)
									' Parse XML
									if xmlDoc.parseError.errorcode <> 0 then
										Response.Write("XML Error...")
									else
										' get xml data
										set statusNode = xmlDoc.documentElement.selectSingleNode("status")
										if statusNode.text = "success" then
											Response.Write("Voici vos comptes : " & "
") set nodeCol = xmlDoc.documentElement.selectNodes("accounts/account") for each accountNode in nodeCol Response.Write("
") Response.Write("L'accountid : " & accountNode.selectSingleNode("account_id").Text & "
") Response.Write("Le nom du compte : " & accountNode.selectSingleNode("account_name").Text & "
") Response.Write("SMS restant : " & accountNode.selectSingleNode("sms_remaining").Text & "
") next else Response.Write("Impossible de récupérer vos comptes :
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
									
									ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
									ENVOYER_SMS_PRO_LOGIN = ""
									ENVOYER_SMS_PRO_PASSWORD = ""
									
									url = ENVOYER_SMS_PRO_HOST & "/api/account/create/"
									str = "accountname=" & Server.URLencode("Nouveau compte ASP")
									
									set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
									xmlhttp.open "POST", url, false
									xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
									xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
									xmlhttp.setRequestHeader "Content-Length", Len(str)
									xmlhttp.send str
									msg = xmlhttp.responseText
									'response.write(msg)
									Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
									' Load the specified XML file (returns XML output)
									xmlDoc.LoadXML(msg)
									' Parse XML
									if xmlDoc.parseError.errorcode <> 0 then
										Response.Write("XML Error...")
									else
										' get xml data
										set statusNode = xmlDoc.documentElement.selectSingleNode("status")
										if statusNode.text = "success" then
											Response.Write("Compte créé : " & "
") set smsNode = xmlDoc.documentElement.selectSingleNode("account/account_id") Response.Write("L'accountid : " & smsNode.text) else Response.Write("Impossible de créer le compte :
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
									
									ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
									ENVOYER_SMS_PRO_LOGIN = ""
									ENVOYER_SMS_PRO_PASSWORD = ""
									
									url = ENVOYER_SMS_PRO_HOST & "/api/account/delete/"
									str = "deleteaccountid=" & Server.URLencode("0")
									
									set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
									xmlhttp.open "POST", url, false
									xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
									xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
									xmlhttp.setRequestHeader "Content-Length", Len(str)
									xmlhttp.send str
									msg = xmlhttp.responseText
									'response.write(msg)
									Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
									' Load the specified XML file (returns XML output)
									xmlDoc.LoadXML(msg)
									' Parse XML
									if xmlDoc.parseError.errorcode <> 0 then
										Response.Write("XML Error...")
									else
										' get xml data
										set statusNode = xmlDoc.documentElement.selectSingleNode("status")
										if statusNode.text = "success" then
											Response.Write("Compte supprimé! " & "
") Response.Write("Voici vos comptes : " & "
") set nodeCol = xmlDoc.documentElement.selectNodes("accounts/account") for each accountNode in nodeCol Response.Write("
") Response.Write("L'accountid : " & accountNode.selectSingleNode("account_id").Text & "
") Response.Write("Le nom du compte : " & accountNode.selectSingleNode("account_name").Text & "
") Response.Write("SMS restant : " & accountNode.selectSingleNode("sms_remaining").Text & "
") next else Response.Write("Impossible de créer le compte :
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
									
									ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
									ENVOYER_SMS_PRO_LOGIN = ""
									ENVOYER_SMS_PRO_PASSWORD = ""
									
									url = ENVOYER_SMS_PRO_HOST & "/api/account/transfer/"
									str = "debitaccountid=" & Server.URLencode("0") & "&creditaccountid=" & Server.URLencode("0") & "&sms=" & Server.URLencode("1")
									
									set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
									xmlhttp.open "POST", url, false
									xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
									xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
									xmlhttp.setRequestHeader "Content-Length", Len(str)
									xmlhttp.send str
									msg = xmlhttp.responseText
									'response.write(msg)
									Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
									' Load the specified XML file (returns XML output)
									xmlDoc.LoadXML(msg)
									' Parse XML
									if xmlDoc.parseError.errorcode ")?> 0 then
										Response.Write("XML Error...")
									else
										' get xml data
										set statusNode = xmlDoc.documentElement.selectSingleNode("status")
										if statusNode.text = "success" then
											Response.Write("SMS transférés!" & "

") Response.Write("Compte débité : " & "

") Response.Write("L'accountid : " & xmlDoc.documentElement.selectSingleNode("accounts/debitaccount/account_id").Text & "
") Response.Write("Le nom du compte : " & xmlDoc.documentElement.selectSingleNode("accounts/debitaccount/account_name").Text & "
") Response.Write("SMS restant : " & xmlDoc.documentElement.selectSingleNode("accounts/debitaccount/sms_remaining").Text & "

") Response.Write("Compte crédité : " & "

") Response.Write("L'accountid : " & xmlDoc.documentElement.selectSingleNode("accounts/creditaccount/account_id").Text & "
") Response.Write("Le nom du compte : " & xmlDoc.documentElement.selectSingleNode("accounts/creditaccount/account_name").Text & "
") Response.Write("SMS restant : " & xmlDoc.documentElement.selectSingleNode("accounts/creditaccount/sms_remaining").Text) else Response.Write("Impossible de créer le compte :
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
									
									ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
									ENVOYER_SMS_PRO_LOGIN = ""
									ENVOYER_SMS_PRO_PASSWORD = ""
									
									url = ENVOYER_SMS_PRO_HOST & "/api/stopsms/activate"
									str = "phonenumber=" & Server.URLencode("33600000000")
									
									set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
									xmlhttp.open "POST", url, false
									xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
									xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
									xmlhttp.setRequestHeader "Content-Length", Len(str)
									xmlhttp.send str
									msg = xmlhttp.responseText
									'response.write(msg)
									Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
									' Load the specified XML file (returns XML output)
									xmlDoc.LoadXML(msg)
									' Parse XML
									if xmlDoc.parseError.errorcode <> 0 then
										Response.Write("XML Error...")
									else
										' get xml data
										set statusNode = xmlDoc.documentElement.selectSingleNode("status")
										if statusNode.text = "success" then
											Response.Write("Le " & xmlDoc.documentElement.selectSingleNode("stopsms/phone_number").Text & " est désormais en STOP SMS")
										else
											Response.Write("Impossible d'activer le STOP SMS : 
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>
				      			<%
									
									ENVOYER_SMS_PRO_HOST = "https://www.envoyersmspro.com"
									ENVOYER_SMS_PRO_LOGIN = ""
									ENVOYER_SMS_PRO_PASSWORD = ""
									
									url = ENVOYER_SMS_PRO_HOST & "/api/stopsms/deactivate"
									str = "phonenumber=" & Server.URLencode("33600000000")
									
									set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
									xmlhttp.open "POST", url, false
									xmlhttp.setRequestHeader "Host", "http://test.envoyersmspro.com"
									xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=utf8"
									xmlhttp.setRequestHeader "Authorization", "Basic " & Base64Encode(ENVOYER_SMS_PRO_LOGIN & ":" & ENVOYER_SMS_PRO_PASSWORD)
									xmlhttp.setRequestHeader "Content-Length", Len(str)
									xmlhttp.send str
									msg = xmlhttp.responseText
									'response.write(msg)
									Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
									' Load the specified XML file (returns XML output)
									xmlDoc.LoadXML(msg)
									' Parse XML
									if xmlDoc.parseError.errorcode <> 0 then
										Response.Write("XML Error...")
									else
										' get xml data
										set statusNode = xmlDoc.documentElement.selectSingleNode("status")
										if statusNode.text = "success" then
											Response.Write("Le " & xmlDoc.documentElement.selectSingleNode("stopsms/phone_number").Text & " n'est plus en STOP SMS")
										else
											Response.Write("Impossible de désactiver le STOP SMS : 
") Response.Write("La requete : " & xmlDoc.documentElement.selectSingleNode("error/request").Text & "
") Response.Write("L'errorid : " & xmlDoc.documentElement.selectSingleNode("error/error_id").Text & "
") Response.Write("L'error message : " & xmlDoc.documentElement.selectSingleNode("error/error_message").Text) end if end if Function Base64Encode(inData) 'ripped from: 'http://www.pstruh.cz/tips/detpg_Base64Encode.htm 'rfc1521 '2001 Antonin Foller, PSTRUH Software, http://pstruh.cz Const Base64 = _ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim sOut, I 'For each group of 3 bytes For I = 1 To Len(inData) Step 3 Dim nGroup, pOut 'Create one long from this 3 bytes. nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + _ MyASC(Mid(inData, I + 2, 1)) 'Oct splits the long To 8 groups with 3 bits nGroup = Oct(nGroup) 'Add leading zeros nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function %>

Nos autres langages de programmation

Vos packs SMS

section


Envoi de sms groupé
ou à l'unité


  • Sans engagement
  • Sans date limite d'utilisation
  • Sans frais supplémentaires
  • Des prix dégressifs


500 SMS

7,4 cts/unité
37 € HT
Achetez

1000 SMS

7 cts/unité
70 € HT
Achetez

5 000 SMS

6,7 cts/unité
335 € HT
Achetez

10 000 SMS

6,5 cts/unité
650 € HT
Achetez

50 000 SMS

6,2 cts/unité
3 100 € HT
Achetez

100 000 SMS

6 cts/unité
6 000 € HT
Achetez


A la carte

SMS = - € HT soit -cts/unité