Behind Li Jiaqi's Lipstick selling, e-commerce application of SMS marketing mode!

Posted by psychowolvesbane on Sat, 09 Oct 2021 12:04:58 +0200

In the beauty industry, if you want to make the lipstick sales of your own brand high, you should attract the first batch of users when the brand comes out with new products. Because of the progress of science and technology, even if there are many lipstick color numbers, over time, different brands may have the same color, that is, what we often call parity substitution. Therefore, The most important thing for big brand lipstick to gain a good profit in the market is to grasp the time. Only by grasping the first time can it bring good profits to the brand.

So how to grasp the first time? Then it is necessary to book a good time to release new products and do a good job in publicity activities, so that customers can know what new color numbers they produce in advance, and let customers know what color these color numbers are, rather than through other people's evaluation. If a multimedia message can let customers know the appearance, texture and color number of the new lipstick, And if MMS can be matched with what color number is suitable for what kind of skin color map, or what kind of city and lipstick suitable for what color number, the effect will be better and the income may be higher.

In this case, MMS marketing must be the best way because MMS marketing Like SMS marketing, it is a one-to-one marketing mode. MMS marketing can enable customers to receive relevant information in the fastest and shortest time. When customers click this information, they will find that there are not only text descriptions, but also video introductions, which has a great visual impact on customers. If you happen to have the lipstick that the customer needs, then this MMS is like timely rain and comes just in time.

Even if customers don't want to buy lipstick, they will understand the lipstick information, let more customers know that the brand is about to produce new products, and may pay more attention to the brand in the future. In a word, this is a publicity of the brand, which brings great benefits, and the benefits can be achieved through Caixin marketing.

With the emergence of small video, the three operators are no longer limited to SMS marketing and MMS marketing. They also launched a new product—— Video message , its form is similar to MMS. The difference is that video SMS can support 1900Kb content and 10-30s small videos. Now some enterprises will use video SMS to send some small videos to customers.

This function can also be used as the company's middle platform system to send and promote targeted messages to different customers.

Sample code

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%

 'Interface type: mutual wireless trigger SMS interface, which supports sending verification code SMS, order notification SMS, etc.
 'Account registration: please open an account through this address http://user.ihuyi.com/?b5kwA
 'matters needing attention:
 '(1)During debugging, please use the system default SMS content: your verification code is: [variable]. Please don't disclose the verification code to others.
 '(2)Please use APIID and APIKEY To call the interface, which can be obtained in the member center;
 '(3)The code is only for reference to access the mutual wireless SMS interface. Customers can write it by themselves according to their actual needs;

Response.Charset = "gb2312"

'asp UTF turn GB2312   take UTF8 Convert encoded text to GB Coded text asp code
function UTF2GB(UTFStr)
for Dig=1 to len(UTFStr)
   'If UTF8 Encoded text in%Conversion at the beginning
   if mid(UTFStr,Dig,1)="%" then
      'UTF8 If the coded text is greater than 8, it will be converted to Chinese characters
     if len(UTFStr) >= Dig+8 then
        GBStr=GBStr & ConvChinese(mid(UTFStr,Dig,9))
        Dig=Dig+8
     else
       GBStr=GBStr & mid(UTFStr,Dig,1)
     end if
   else
      GBStr=GBStr & mid(UTFStr,Dig,1)
   end if
next
UTF2GB=GBStr
end function

'GB2312 turn UTF8 of asp Code will GB Convert encoded text to UTF8 Coded text
Function toUTF8(szInput)
     Dim wch, uch, szRet
     Dim x
     Dim nAsc, nAsc2, nAsc3
     'If the input parameter is empty, the function exits
     If szInput = "" Then
         toUTF8 = szInput
         Exit Function
     End If
     'Start conversion
      For x = 1 To Len(szInput)
         'utilize mid Function partition GB Coded text
         wch = Mid(szInput, x, 1)
         'utilize ascW Function returns each GB Coded text Unicode Character code
         'Note: asc The function returns ANSI Character code, pay attention to the difference
         nAsc = AscW(wch)
         If nAsc < 0 Then nAsc = nAsc + 65536
    
         If (nAsc And &HFF80) = 0 Then
             szRet = szRet & wch
         Else
             If (nAsc And &HF000) = 0 Then
                 uch = "%" & Hex(((nAsc \ 2 ^ 6)) Or &HC0) & Hex(nAsc And &H3F Or &H80)
                 szRet = szRet & uch
             Else
                'GB Coded text Unicode The character code is 0800 - FFFF Three byte template is used between
                 uch = "%" & Hex((nAsc \ 2 ^ 12) Or &HE0) & "%" & _
                             Hex((nAsc \ 2 ^ 6) And &H3F Or &H80) & "%" & _
                             Hex(nAsc And &H3F Or &H80)
                 szRet = szRet & uch
             End If
         End If
     Next         
     toUTF8 = szRet
End Function

'Binary to hexadecimal asp code
function c2to16(x)
    i=1
    for i=1 to len(x) step 4
       c2to16=c2to16 & hex(c2to10(mid(x,i,4)))
    next
end function

'Binary to decimal asp code
function c2to10(x)
    c2to10=0
    if x="0" then exit function
      i=0
    for i= 0 to len(x) -1
       if mid(x,len(x)-i,1)="1" then c2to10=c2to10+2^(i)
    next
end function

'Hexadecimal to binary asp code
function c16to2(x)
     i=0
     for i=1 to len(trim(x))
       tempstr= c10to2(cint(int("&h" & mid(x,i,1))))
       do while len(tempstr)<4
          tempstr="0" & tempstr
       loop
       c16to2=c16to2 & tempstr
    next
end function

function c10to2(x)
    mysign=sgn(x)
    x=abs(x)
    DigS=1
    do
       if x<2^DigS then
         exit do
       else
         DigS=DigS+1
       end if
    loop
    tempnum=x
    i=0
    for i=DigS to 1 step-1
       if tempnum>=2^(i-1) then
          tempnum=tempnum-2^(i-1)
          c10to2=c10to2 & "1"
       else
          c10to2=c10to2 & "0"
       end if
    next
    if mysign=-1 then c10to2="-" & c10to2
end function

'UTF8 The encoded text will be converted to Chinese characters
function ConvChinese(x)
    A=split(mid(x,2),"%")
    i=0
    j=0
   for i=0 to ubound(A)
      A(i)=c16to2(A(i))
   next
   for i=0 to ubound(A)-1
     DigS=instr(A(i),"0")
     Unicode=""
     for j=1 to DigS-1
       if j=1 then
         A(i)=right(A(i),len(A(i))-DigS)
         Unicode=Unicode & A(i)
       else
          i=i+1
          A(i)=right(A(i),len(A(i))-2)
          Unicode=Unicode & A(i)
       end if
     next
     if len(c2to16(Unicode))=4 then
        ConvChinese=ConvChinese & chrw(int("&H" & c2to16(Unicode)))
     else
        ConvChinese=ConvChinese & chr(int("&H" & c2to16(Unicode)))
     end if
   next
end function

'GB2312 Chinese turn unicode(&#)asp code converts GB encoded text into unicode encoded text
function chinese2unicode(Str)
   dim i
   dim Str_one
   dim Str_unicode
   if(isnull(Str)) then
      exit function
   end if
   for i=1 to len(Str)
     Str_one=Mid(Str,i,1)
     Str_unicode=Str_unicode&chr(38)
     Str_unicode=Str_unicode&chr(35)
     Str_unicode=Str_unicode&chr(120)
     Str_unicode=Str_unicode& Hex(ascw(Str_one))
     Str_unicode=Str_unicode&chr(59)
   next
   chinese2unicode=Str_unicode
end function  

'URL Address encoding and decoding function
Function URLDecode(enStr)
dim deStr
dim c,i,v
deStr=""
for i=1 to len(enStr)
   c=Mid(enStr,i,1)
   if c="%" then
    v=eval("&h"+Mid(enStr,i+1,2))
    if v<128 then
     deStr=deStr&chr(v)
     i=i+2
    else
     if isvalidhex(mid(enstr,i,3)) then
      if isvalidhex(mid(enstr,i+3,3)) then
       v=eval("&h"+Mid(enStr,i+1,2)+Mid(enStr,i+4,2))
       deStr=deStr&chr(v)
       i=i+5
      else
       v=eval("&h"+Mid(enStr,i+1,2)+cstr(hex(asc(Mid(enStr,i+3,1)))))
       deStr=deStr&chr(v)
       i=i+3
      end if
     else
      destr=destr&c
     end if
    end if
   else
    if c="+" then
     deStr=deStr&" "
    else
     deStr=deStr&c
    end if
   end if
next
URLDecode=deStr
end function

'Determine whether it is a valid hexadecimal code
function isvalidhex(str)
dim c
isvalidhex=true
str=ucase(str)
if len(str)<>3 then isvalidhex=false:exit function
if left(str,1)<>"%" then isvalidhex=false:exit function
   c=mid(str,2,1)
if not (((c>="0") and (c<="9")) or ((c>="A") and (c<="Z"))) then isvalidhex=false:exit function
   c=mid(str,3,1)
if not (((c>="0") and (c<="9")) or ((c>="A") and (c<="Z"))) then isvalidhex=false:exit function
end function

'Request data to SMS interface
Function Post(url,data)
	dim Https
	set Https=server.createobject("MSXML2.XMLHTTP")
	Https.open "POST",url,false
	Https.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
	Https.send data
	if Https.readystate=4 then
		dim objstream
		set objstream = Server.CreateObject("adodb.stream")
		objstream.Type = 1
		objstream.Mode =3
		objstream.Open
		objstream.Write Https.responseBody
		objstream.Position = 0
		objstream.Type = 2
		objstream.Charset = "utf-8"
		Post = objstream.ReadText
		objstream.Close
		set objstream = nothing
		set https=nothing
	end if
End Function

'Function returns a random integer.
Function gen_key(digits)	
	'Create and define array
	dim char_array(50)
	char_array(0) = "0"
	char_array(1) = "1"
	char_array(2) = "2"
	char_array(3) = "3"
	char_array(4) = "4"
	char_array(5) = "5"
	char_array(6) = "6"
	char_array(7) = "7"
	char_array(8) = "8"
	char_array(9) = "9"
	
	'Initiate randomize method for default seeding
	randomize
	
	'Loop through and create the output based on the the variable passed to
	'the function for the length of the key.
	do while len(output) < digits
	num = char_array(Int((9 - 0 + 1) * Rnd + 0))
	output = output + num
	loop
	
	'Set return
	gen_key = output
End Function


Dim mobile
mobile = request("mobile")	'phone number


    if mobile="" then
       response.Write("Mobile phone number cannot be empty")
    else
		
		if request.Form("send_code") = "" or Session("send_code")<>request.Form("send_code") then
			'Protection against malicious user requests
			response.Write("The request timed out. Please refresh the page and try again")
		else	
			     
			dim target,post_data,content,res,mobile_code
			mobile_code = gen_key(4)
			Session("mobile_code") = mobile_code
			'Response.Cookies("mobile_code") = mobile_code
			Session("mobile") = mobile
			'Response.Cookies("mobile") = mobile
			target = "http://106.ihuyi.com/webservice/sms.php?method=Submit"
			content = toUTF8("Your verification code is:"&mobile_code&". Please don't disclose the verification code to others.")
			post_data = "account=user name&password=password&mobile="&mobile&"&content="&content
			'View user name login user center->Verification code notification SMS>Product overview->API Interface information->APIID
			'View password login user center->Verification code notification SMS>Product overview->API Interface information->APIKEY
			'Response.write toUTF8("SMS test")
			'response.Write(UTF2GB(Post(target,post_data)))
	
			tempstr = UTF2GB(Post(target,post_data))
			'if instr(tempstr,"Submitted successfully")>0 Then
				'response.Write("true") 
			'else
				'response.Write("error") 
			'end if
	
			Dim len1,len2
			len1 = instr(1,tempstr,"</code>",1)-1
			len2 = instr(1,tempstr,"<code>",1)
			'response.Write(len2)
			code=left(tempstr,len1)
			code=right(code,(len1-len2-5))
			'response.Write(code)
	
			Dim len3,len4
			len3 = instr(1,tempstr,"</msg>",1)-1
			len4 = instr(1,tempstr,"<msg>",1)
			'response.Write(len2)
			msg=left(tempstr,len3)
			msg=right(msg,(len3-len4-4))
			response.Write(msg)
			
		end if

    end If
%>

Topics: Big Data