一个在vbscript中读取cookie的程序函数

2016-01-29 18:18 40 1 收藏

一个在vbscript中读取cookie的程序函数,一个在vbscript中读取cookie的程序函数

【 tulaoshi.com - ASP 】

  function cookievalue(pcook)
lhowlong=len(pcook)
lwhereis=instr(document.cookie,pcook)
if lwhereis=0 then
cookievalue=false
else
lstartpos=len(document.cookie)-lwhereis-lhowlong
lstartstring=right(document.cookie,lstartpos)
do
lchar=left(lstartstring,1)
if lchar=";" then
   cookievalue=lendstring
    exit do
  else
  lendstring=lendstring & lchar
  if len(lstartstring)=1 then
   cookievalue=lendstring
   exit do
  else
  lstartstring=right(lstartstring,len(lstartstring)-1)
  end if
end if
loop
end if
end function

 

来源:https://www.tulaoshi.com/n/20160129/1505221.html

延伸阅读
标签: ASP
<% Dim myarr For i = 0 To 100 Randomize no = Int((1000-1+1)*Rnd+1) For j = 0 To i If no < myarr(j) And no < "" Then j = j + 1 Else Exit For End If myarr(i) = no Next If i = 21 Then Exit For End If Next %
标签: Web开发
import java.sql.*; import java.io.*; public class WriteDB {         public static void main(String[] args)  {         Connection conn=null;         String driver="com.mysql.jdbc.Driver...
private void SaveCookie(string CookieName,string CookieValue) { HttpCookie myCookie = new HttpCookie(CookieName); DateTime now = DateTime.Now; // Set the cookie value. myCookie.Value = CookieValue; // Set the cookie expiration date. myCookie.Expires = now.AddYears(1); if(this.Response.Cookies[CookieName]!=nul...
标签: PHP
  (主要用了两个字符串函数implode()和explode) 我制作的域名查询的源代码,主要用了两个字符串函数implode()和explode,利用这两个函数的切割字符串的强大功能,可以查询.com,.net.,org.,cc.,tv下的域名whois。 <?php echo '<center<form'; echo '<input type="text" name="string"'; echo '<in...
我们通常把数据存诸在txt文件上,但是我们通常要把这些数据取出来并进行处理。下面我将介绍一种在VC++应用程序中读取文本数据的方法。 一.前言 因为经常要处理地质方面的数据。但是很多数据它不是直接存贮在数据库文件(如Access文件等),而是存贮在txt文件。经常有同学问我怎么通过编程读取实现文本文件中的数据。其实存贮在txt文件也有它...

经验教程

216

收藏

64
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部