flashÓëphp½áºÏʵÏÖIP¼°¹éÊôµØ²éѯ
Êý¾Ý¿âÊÇ ´¿ÕæÊý¾Ý¿â ¸ñʽΪ UTF-8 txt¸ñʽ
phpÎļþÊÇUTF-8±àÂë
demo : http://dreamnight.gicp.net/zendphp/IP/connect.swf
flash¶Ë£º
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.ProgressEvent;
//import flash.text.TextFormat
//flash.system.System.useCodePage=true;//
var myIP:String;
var myPlace:String;
var loader:URLLoader= new URLLoader();
var id=getTimer();
var url:String = " http://dreamnight.gicp.net/zendphp/IP/ipTest.php";
var urlRequest:URLRequest = new URLRequest(url+"?id="+id);
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
loader.load(urlRequest);
loader.addEventListener(Event.COMPLETE,handle);
loader.addEventListener(ProgressEvent.PROGRESS,onProgress);
//var format:TextFormat= new TextFormat();
//format.font="ËÎÌå";
//showText.defaultTextFormat=format;
function handle(e:Event):void{
trace("¼ÓÔØÍê³É");
var phpData:*=e.target.data;
trace(phpData);
myIP=String(phpData.ip);
trace(myIP);
myPlace=String(phpData.area);
trace(myPlace);
showText.text="ÄúËùÔÚµÄλÖÃÊÇ"+myPlace+"\nÄúµÄIPµØÖ·ÊÇ"+myIP;
//ÊÍ·ÅÄÚ´æ
loader.removeEventListener(Event.COMPLETE,handle);
loader.removeEventListener(ProgressEvent.PROGRESS,onProgress);
url="";
urlRequest=null;
loader=null;
}
function onProgress(e:ProgressEvent):void{
var percent:int=int(e.bytesLoaded*100/e.bytesTotal);
showText.text="ÒѾ¼ÓÔØ"+percent+"%";
}
php¶Ë£ºÂ·¾¶ÊÇ £º http://dreamnight.gicp.net/zendphp/IP/ipTest.php
<?php
//header("Content-Type:text/html;charset=gb2312");
//$getIP="111.176.149.35"; // ÕâÀïÊÇ×Ô¼ºËæ±ãдµÄÒ»¸öip ʵ¼ÊʱÄ㻹Ҫͨ¹ý³ÌÐòµÃµ½Õâ¸öip
$getIP="³õʼIP";
$getIP=getIP();
//µÃµ½µ±Ç°Ä¿Â¼
$PHP_SELF=$_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
$dir='http://'.$
Ïà¹ØÎĵµ£º
Í·²¿µ÷ÓÃ
<?
require('conn.php');
$sql1="select id from news";
$query1=mysql_query($sql1,$conn);
$sun_num=mysql_num_rows($query1);
$gs=20;
$page_num=ceil($sun_num/$gs);
include("../subpage.php");
//´«¹ýÀ´µÄÒ³Êý²ÎÊý
$PB_page=$_GET['PB_page'];
if ($PB_page==1 or empty($PB_page)){
$ ......
×÷Õß: laruence(http://www.laruence.com
)
±¾ÎĵØÖ·: http://www.laruence.com/2010/05/04/1450.html
תÔØÇë×¢Ã÷³ö´¦
ÔÚ´óÐ͵ÄWebÏîÄ¿ÖÐ, include_pathÊÇÒ»¸öÄ£¿é»¯Éè¼ÆµÄ¸ù±¾Öеĸù±¾(µ±È»,ÏÖÔÚÒ²Óкܶà»ùÓÚautoloadµÄÉè¼Æ,
Õâ¸ö²»Ó°Ïì±¾ÎĵÄ̽ÌÖ), µ«ÊÇÕýÊÇÒòΪinclude_path, ¾³£»áÈÃÎÒÃÇÓöµ½Ò»Ð©ÒòΪûÓÐÕÒµ½Õ ......
ÅäºÏ½¹µãͼflashʹÓã¬ÔÀ´ÊÇÈ¡µÃ×îеÄͼƬÎÄÕ£¬È»ºó°ÑÏà¹ØÐÅÏ¢×÷Ϊ²ÎÊý´«µÝ¸øflash²¥·Å¡£
focus.asp´úÂëÈçÏ£º
<!--#Include File="conn.asp" -->
<!--#Include File="include/inc.asp"-->
<%
'Ê×Ò³½¹µãÒ³Ãæ
'by winston
'2010/05/15
Dim QueryArray
Dim FocusLinks,FocusP ......
CLSID clsid;
HRESULT hr =
CLSIDfromProgID(L"ShockwaveFlash.ShockwaveFlash", &clsid);
ÒÔÉÏ´úÂëÓÃÀ´¼ì²âFlashÊÇ·ñ°²×°£¬CLSIDfromProgIDͨ¹ý×¢²á±íÀ´²éѯCLSIDµÄÖµ¡£²»ÖªºÎ¹ÊÓÐʱע±íÄÚ×¢²áÏî²»ÍêÕû£¨ÔÚXP£¬2003Öж¼ÓгöÏÖ£©,²éѯµÃÖªHKEY_CLASSES_ROOT\ShockwaveFlash ......