Jump to content

A Biggeners Question


RON_ron

Recommended Posts

it's been done in flash.

 

FLASH SCRIPT:

myData = new LoadVars();
myData.onLoad = function(){
placeTheDataIntoTheRightPlace();
};
myData.load("http://www.myweb/myData.php");

placeTheDataIntoTheRightPlace = function(){
referrer_txt.text = myData.textbData1;
};

Link to comment
Share on other sites

why not just load it into flash via xml? and also this isn't exactly the forum to ask this in :) I know flash as3 to an extent but I haven't coded in it for about a year.

 

var ldr:URLLoader = new URLLoader();
var x:XML = new XML();
ldr.addEventListener(Event.COMPLETE, LoadXML);
ldr.load(new URLRequest("yourXmlFile.xml"));
function LoadXML(e:Event):void {
x = XML(e.target.data);
trace(x.dataForTextBox[0]);
}

 

and make yourXmlFile.xml push out

 

<dataForTextBox>Whatever</dataForTextBox>

Link to comment
Share on other sites

Thanks for your reply.

 

But I'm asking the correct code in PHP.

 

My current code display only the text written within " ".

 

I want to get the exact TEXT from dataForTxtbox_1 text. How to do that? I'm sure I'm in the correct forum to ask this.  ;)

 

CODE:

<?PHP

$dataForTxtbox_1 = "This is our FIRST variable,  ";

print("&textbData1=$dataForTxtbox_1");

?>

Link to comment
Share on other sites

Sorry for the confution. My English is hopeless  :shrug: I'll try to explain once more. It sounds wired but this is what should happen.

 

 

I copies a URL from one website (www.ABC.com) and pass it over to the PHP server script.

 

The PHP script on the server redirects it (the URL) back to my website (www.XYZ.net).

 

Finally I can view the it in my website (www.XYZ.net)

 

 

I need help to write the server side script which redirets the URL

 

Link to comment
Share on other sites

file_get_contents

 

or if you don't want the content you want the 100% redirect

 

header('Location: http://www.abc.com');

 

however, if you're making this connection from flash to php, php will redirect the requested file, not the current file executing the current script..

 

You'd probably (if you're intending to redirect the page the flash app is on) want ExternalInterface;

 

import flash.external.ExternalInterface;
ExternalInterface.call('someJsFunctionToRedirectThePage');

Link to comment
Share on other sites

Can't PHP just send back the data it received?  :shrug:

 

 

E.g. PHP receives www.asd.org/mybook/redhat.html, Can't PHP just send that back to FLASH? (I've done the hard part in capturing the URL... I just need to send it to another location vis PHP)

 

SOMETHING LIKE THIS SO I CAN GET IT FROM FLASH.

 

<?PHP

$reveived_url1 = &textData1;

?>

Link to comment
Share on other sites

Ron, I understand English isn't your native tongue, but we need to settle and actually get to exactly what it is your trying to do.

 

Without describing the how (because that is getting in the way), describe in details exactly what you want to achieve. We may all be looking at this the wrong way.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.