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)){
$ ......
htmlspecialchars()
º¯Êý°ÑһЩԤ¶¨ÒåµÄ×Ö·ûת»»Îª HTML ʵÌå¡£
ENT_COMPAT - ĬÈÏ¡£½ö±àÂëË«ÒýºÅ¡£
eg:" £¨Ë«ÒýºÅ£© ³ÉΪ "
implode()
º¯Êý°Ñ
Êý×éÔªËØ×éºÏΪһ¸ö×Ö ......
ÎÄ/Fenying
¡¡¡¡ÀýÈçÓг£ÓÃʱ¼ä¸ñʽ yyyy-mm-dd HH:ii:ss£¬ÈçºÎת»»³ÉPHPÖÐdateº¯Êý¿ÉʹÓõÄʱ¼ä¸ñʽÄØ£¿
¡¡¡¡Ê¹Óà PHPTimeFormatfromCommon() ¿ÉÒÔ°ÑͨÓÃʱ¼ä¸ñʽת»»³ÉPHPʱ¼ä¸ñʽ
¡¡¡¡¡¡¡¡PHPTimeFormatfromCommon('yyyy-mm-dd HH:ii:ss') => 'Y-m-d H:i:s'
¡¡¡¡Ê¹Óà PHPTimeFormatToCommon() ¿ÉÒÔ° ......
ÅäºÏ½¹µãͼflashʹÓã¬ÔÀ´ÊÇÈ¡µÃ×îеÄͼƬÎÄÕ£¬È»ºó°ÑÏà¹ØÐÅÏ¢×÷Ϊ²ÎÊý´«µÝ¸øflash²¥·Å¡£
focus.asp´úÂëÈçÏ£º
<!--#Include File="conn.asp" -->
<!--#Include File="include/inc.asp"-->
<%
'Ê×Ò³½¹µãÒ³Ãæ
'by winston
'2010/05/15
Dim QueryArray
Dim FocusLinks,FocusP ......