 |
Featured jobs
Featured template
View more templates
 |
 |


Next 5
advanced detection of over 250 language - country codes, php
 |
 |
<html> <!-- upload this script as "yourtld.php" and a flash movie "hostname.swf" -->
<head>
<title>ccTLD suffix detection - 2004 by www.advance-media.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000">
<?php
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']); // returns the host name, including the ccTLD country code Top Level Domain. Detecting over 250 language/country/region/island codes by today.
if (is_numeric(substr($host, -1))){ // if last char is numeric than track the host ip number as not identifiable
$cctld=$idsld="not";
}else{
$elem=explode( ".", $host); // split the host into an array
$howm=count($elem);
$cctld=$elem[$howm-1];// the ccTLD suffix is the last element
if ($elem[$howm-2]=="edu" or $elem[$howm-2]=="ac" or $elem[$howm-2]=="org" or $elem[$howm-2]=="mil" or $elem[$howm-2]=="gov" or $elem[$howm-2]=="eu" or $elem[$howm-2]=="nato" or $elem[$howm-2]=="un"){
$idsld=$elem[$howm-2];
// filter, analyse of common sub domains, identify country codes Second Level Domain SLD or 2LD. Like academic ac.uk and ac.jp or edu.pl and edu.au, bj.cn would be Beijing China and qc.ca Quebec Canada
// only the second level domains listed in the if statement are detected, edit as you like
}else{
$idsld="not";
}
}
?>
<table width="100%" height="100%" border="0"> <!-- html table to center the film -->
<tr>
<td align="center" valign="middle">
<!-- embed the flash movie -->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH="500" HEIGHT="450">
<PARAM NAME=movie VALUE="hostname.swf<?php /* send $cctld and $idsld to flash */ echo ("?cctld=$cctld&idsld=$idsld"); ?>"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000>
<EMBED src="hostname.swf<?php /* and here */ echo ("?cctld=$cctld&idsld=$idsld"); ?>" menu=false quality=high bgcolor=#000000 WIDTH="500" HEIGHT="450"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</td>
</tr>
</table>
</body>
</html>
<!--
// Here is the action script of the flash movie called "hostname.swf" to be created
// placed it on frame 10
if (_root.idsld == undefined) { // loop until the variables are retreived
gotoAndPlay(9);
}
// on frame 11
if (_root.cctld == "not" or _root.cctld == "com" or _root.cctld == "net") { // if not identifiable or international like .com or .net
sys_all = System.capabilities.serverString; // than further language details are available in flash MX 6,7
la = System.capabilities.language;
// la= player plug in language
pos = sys_all.indexOf("&L=")+3;
syla = sys_all.substr(pos);
pos = syla.indexOf("&");// this line and the next if statement is needed by the flash 7 player, the serverString got extended, the L=language is not the last variable element any more.
if (pos != -1) {
syla = syla.substr(0, pos);// syla = operating system language which might be different from the la= player plug in language
}
// create dynamic text fields showing the variables la, syla, cctld, idsld, now you can make a sophisticated language decision
// actual country code list, suffix ccTLD on the net
// info System.capabilities http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary710.html
}
-->
Posted by: Folko Langner | website
http://www.advance-media.com
|
 |
 |
 |
AMFPHPRemoteGateway
 |
 |
package com.ericfeminella.net
{
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
import flash.net.Responder;
import mx.rpc.IResponder;
public class AMFPHPRemoteGateway extends NetConnection
{
protected var remoteClass:String;
protected var result:Function;
protected var fault:Function;
public function AMFPHPRemoteGateway()
{
this.objectEncoding = ObjectEncoding.AMF3;
}
public function set gatewayURI(gatewayURI:String):void
{
this.connect(gatewayURI);
}
public function set remoteServiceClass(remoteClass:String):void
{
this.remoteClass = remoteClass;
}
public function invoke(method:String, ...args):void
{
var responder:Responder = new Responder(this.resultProxy, this.faultProxy)
var remoteClass:String = this.remoteClass + "." + method;
super.call.apply(null, [remoteClass, responder].concat(args));
}
public function set resultResponder(result:Function):void
{
this.result = result;
}
public function set faultResponder(fault:Function):void
{
this.fault = fault;
}
protected function resultProxy(data:Object):void
{
this.result(data);
}
protected function faultProxy(info:Object):void
{
this.fault(info);
}
}
}
Posted by: Eric Feminella | website
http://www.ericfeminella.com/blog
|
 |
 |
 |
basics to send a flash film in a (html) email generated by php
 |
 |
<?php
// this script provides all the basics to send a flash film in a (html)
//email generated by php hook this script to your newsletter database table
//of recipients or use it as middleware for a (flash)form to mail
// in outlook the ActiveX control must be allowed (which is the
//most usual security zone setting -> tools -> options -> security), no problem with NS
// 2004 by www.advance-media.com
$to = "YOU<info@your_server.com>";
$from = "www.ADVANCE-MEDIA.com<info@advance-media.com>";
$subject = "FLASH - html - email";
$file = "http://www.advance-media.com/prev_next.swf"; // absolute path to the flash film to be included in the email
$html_content = '
<html>
<head>
<title>www.advance-media.com FLASH - html - email</title>
</head>
<body bgcolor="#ffffff">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH="230" HEIGHT="245">
<PARAM NAME=movie VALUE="'.$file.'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="'.$file.'" quality=high bgcolor=#FFFFFF WIDTH="230" HEIGHT="245" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</body>
</html>
';
$header = "From: ".$from."\n";// eventually your servers requires a "\r\n" instead of the "\n" (carriage return + newline) in the header
$header.= "MIME-Version: 1.0\n";// otherwise no need to edit the header but you'll find more info at www.php.net -> mail
$header.= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$header.= "Content-Transfer-Encoding: 7bit\n";
if(mail($to, $subject, $html_content, $header)) {
echo ("MAIL SEND OKAY!");
}else{
echo ("MAIL ERROR!");
}
?>
Posted by: Folko Langner | website
http://www.advance-media.com
|
 |
 |
 |
CLOCK AND DATE SET BY SEVER (GMT) TIMESTAMP, PHP
 |
 |
<html> <!-- <head>
<title>GMTtimer, 2004 by www.advance-media.com</title>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META name="PUBLISHER" content="WWW.ADVANCE-MEDIA.COM">
<META http-equiv="PRAGMA" content="no-cache"> <!-- <META http-equiv="EXPIRES" content="0">
</head>
<body bgcolor="#000000" onload="frame ()">
<table width="100%" height="100%" border="0"> <!-- <tr>
<td align="center" valign="middle">
<?php
$timestamp = explode(" ",microtime());
$timestamp = round(($timestamp[1] + $timestamp[0])*1000); ?>
<!-- <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="69%" HEIGHT="69%">
<PARAM NAME=movie VALUE="GMTtimer.swf?timestamp=<?php /* if your server does not support the php microtime(); call, try out the GMT seconds timestamp here: echo time()*1000; */ echo $timestamp; ?>">
<PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000>
<EMBED src="GMTtimer.swf?timestamp=<?php /* and here */ echo $timestamp; ?>" menu=false quality=high bgcolor=#000000 WIDTH="69%" HEIGHT="69%"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</td>
</tr>
</table>
</body>
</html>
<!-- GMTtimer = new Date();
weekday = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
month = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
function fillup(digit) {
if (digit<10) {
digit = "0"+digit;
}
return (digit);
}
isNaN(timestamp) or timestamp == undefined ? gotoAndPlay(9) : timestamp=parseInt(timestamp);
GMTtimer.setTime(timestamp+getTimer());
output = weekday[GMTtimer.getUTCDay()];
output += ", "+month[GMTtimer.getUTCMonth()];
output += " "+GMTtimer.getUTCDate();
output += ", "+GMTtimer.getUTCFullYear();
output += " "+fillup(GMTtimer.getUTCHours());
GMTtimer.getUTCMilliseconds()>666 ? blink=" " : blink=":";
output += blink+fillup(GMTtimer.getUTCMinutes());
output += blink+fillup(GMTtimer.getUTCSeconds());
gotoAndPlay(11);
Posted by: Folko Langner | website
http://www.advance-media.com
|
 |
 |
 |
Consuming eBay Price Watcher by Flash Remoting MX for .NET
 |
 |
// WSDL: http://www.xmethods.net/sd/2001/EBayWatcherService.wsdl
// Include remoting components
#include "NetServices.as"
#include "NetDebug.as"
// "Only once" codes
if (inited == null) {
inited = true;
// Create gateway
NetServices.setDefaultGatewayUrl
("http://localhost/eBayPriceWatcher/gateway.aspx");
// Create gateway connection object
gatewayConnection = NetServices.createGatewayConnection();
eBayWS = gatewayConnection.getService
("http://www.xmethods.net/sd/2001/EBayWatcherService.wsdl", this);
// 2511817428 is an item number taken from eBay.Com and its auction will
// be no longer available after 4th March. So, in order to test, you have to
// get another item and its number from eBay.Com.
eBayWS.getCurrentPrice("2511817428");
}
// Get the current bid on the item
function getCurrentPrice_Result(result) {
trace(result);
}
// Report the errors for debugging
function getCurrentPrice_Status(result) {
trace("Error: " + result.details);
}
Posted by: Mustafa Basgun | website
http://www.basgun.com
|
 |
 |
 |
Next
5
|  |
Search Entire Site
Advertisements
Latest New Articles
- Set up a simple IIS Server for Flash
by Peter McBride - Day 1 at FITC Toronto 2008
by Anthony Pace - Simple reflection effect with AS2
by Jean André Mas - ActionScript.org Meets Josh Tynjala (aka dr_zeus)
by ActionScript.org Staff - Rapidly Create Online Flash Movies to Help Users Market, Sell and Support Software and Hardware
by Sabrina F
|
 |