WAP version of the mobile phone number location query

Source: Internet
Author: User
Tags sql net query
Completed a simple and useful WAP site--wap version of the mobile phone number location query
Address: Http://hikey.net/wap
With WAP-enabled mobile phone view, IE does not support

If your phone does not support WAP or if you do not want that kind of money, you can use a simulator provided by Gelon.net to see my work
Just open this address, okay?
Http://www.gelon.net/cgi-bin/wapalize.cgi?url=http://hikey.net/wap

IE code to choose Simplified Chinese ha
Slide the screen by the wheel

WAP Internet by flowmeter fee, I do not use pictures, words are not much
It's supposed to be a bargain to find something, huh?

Main code:

<% response.contenttype= "TEXT/VND.WAP.WML"%>
<?xml version= "1.0" encoding= "gb2312"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.3//en" "HTTP://WWW.WAPFORUM.ORG/DTD/WML13.DTD" >
<wml>
<card id= "SJ" title= "Mobile number location Query" >
<%
' Database connection
Dim connstr1,conn1
Const db= "Xxx.mdb" ' Mobile Library Path
connstr1= "dbq=" +server.mappath ("&DB&") + ";D efaultdir=;D river={microsoft Access DRIVER (*.mdb)};
Set Conn1=server.createobject ("ADODB. CONNECTION ")
Conn1.open CONNSTR1

' Filter Illegal characters
function Chk (str)
If str<> "" Then
Chktopic=replace (str, "'", "" ")
End If
End Function
%>
<%
' Mobile search
If Request.Form ("SJ") <> "then"
d= chk (Request.Form ("SJ"))
' Judge whether it is a number or a number greater than 7 digits
If Len (d) >=7 and IsNumeric (d) Then
C=left (d,7)

' There's a lot of code omitted
Sql= "SELECT * from mod where start<=" &c& "and end>=" &c& "and mid (start,3,1) =" &mid (c,3,1) & "and mid (end,3,1) =" &mid (c,3,1) & "and mid (start,4,1) =" &mid (c,4,1) & "and mid (end,4,1) =" &mid (c,4,1 ) & "and mid (start,5,1) =" &mid (c,5,1) & "and mid (end,5,1) =" &mid (c,5,1) & "and mid (start,6,1) =" & Mid (c,6,1) & "and mid (end,6,1) =" &mid (c,6,1) & ""
Set Rs=conn1.execute (SQL)
If not rs.eof then
A=rs ("City")
B=rs ("City1")
E=rs ("url")
F=rs ("thank")
Set rs=nothing
Else
A= "Sorry, I didn't find the record for this number."
End If
Else
A= "ERROR: Please make sure you enter a number greater than 7 digits!" "
End If
%>
<b> your search for mobile phone number:</b><br/>
<%=d%><br/>
<b> Address:</b><%=a%> <%=b%><br/>
<b> area code and Description:</b><br/>
<%=e%> <%=f%>
<br/><br/>
<%end if%>

Please enter your mobile phone number
<input size= "8" name= "SJ" type= "text" maxlength= "one"/>
<anchor title= "OK" > OK
<go href= "index.asp" method= "POST" >
<postfield name= "SJ" value= "$SJ"/>
</go>
</anchor>
<p align= "center" ><b>Hikey.NET</b></p>
</card>
</wml>
<%
Set conn1=nothing
%>




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.