MXML CODE:
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
- <mx:Button label="Get IP" click="dir.send()" x="258" y="238"/>
- <mx:TextInput text="Ip:{dir.lastResult.ip}" x="210" y="208"/>
- </mx:Application>
PHP CODE:
- <?php
- $REMOTE_ADDR;
- if ($REMOTE_ADDR)
- {
- $message = "<result><ip>$REMOTE_ADDR</ip></result>";
- }
- else
- {
- $message = "<result><ip>No Ip or any message.</ip></result>";
- }
- echo $message;
- ?>
No comments:
Post a Comment