RON_ron Posted October 1, 2009 Share Posted October 1, 2009 How to receive the text back which was sent to the server side script. dataForTxtbox_1 = TEXT SENDER textbData1 = TEXT RECEIVER Current Code: <?PHP $dataForTxtbox_1 = &textbData1; ?> Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/ Share on other sites More sharing options...
RussellReal Posted October 1, 2009 Share Posted October 1, 2009 show some of the html attached to this.. Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928195 Share on other sites More sharing options...
RON_ron Posted October 1, 2009 Author Share Posted October 1, 2009 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; }; Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928197 Share on other sites More sharing options...
RON_ron Posted October 1, 2009 Author Share Posted October 1, 2009 Please someone help me. What is the command to send back the received text? (it's a server side script). dataForTxtbox_1 = TEXT SENDER (to the php script) textbData1 = TEXT RECEIVER (back to my web page) Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928204 Share on other sites More sharing options...
RussellReal Posted October 1, 2009 Share Posted October 1, 2009 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> Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928209 Share on other sites More sharing options...
RON_ron Posted October 1, 2009 Author Share Posted October 1, 2009 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"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928215 Share on other sites More sharing options...
RussellReal Posted October 1, 2009 Share Posted October 1, 2009 I'm really not following you here.. maybe try $_REQUEST but if not I really can't understand you dude, I apologize for that but I'm trying to help you as best I can Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928220 Share on other sites More sharing options...
RON_ron Posted October 1, 2009 Author Share Posted October 1, 2009 Sorry for the confution. My English is hopeless 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 Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928232 Share on other sites More sharing options...
RussellReal Posted October 1, 2009 Share Posted October 1, 2009 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'); Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928235 Share on other sites More sharing options...
redarrow Posted October 1, 2009 Share Posted October 1, 2009 this will help you but mod_rewrite is a huge subject on it own. http://www.4webhelp.net/tutorials/misc/mod_rewrite.php Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928236 Share on other sites More sharing options...
RON_ron Posted October 1, 2009 Author Share Posted October 1, 2009 Can't PHP just send back the data it received? 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; ?> Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928247 Share on other sites More sharing options...
redarrow Posted October 1, 2009 Share Posted October 1, 2009 try Curl it can post back? http://uk2.php.net/curl curl tutorial http://phpsense.com/php/php-curl-functions.html Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928250 Share on other sites More sharing options...
RussellReal Posted October 1, 2009 Share Posted October 1, 2009 php does not work with flash.. it just outputs data.. you could.. echo file_get_contents($_GET['url'])); and in flash call the file as www.whatever.com/file.php?url=http://theurl.com/url/to/post/back.php Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928274 Share on other sites More sharing options...
redarrow Posted October 1, 2009 Share Posted October 1, 2009 RON you been going on about the $_GET[''] function for a long time now 56789 even more posts man? RussellReal shown you now correctly bro Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928277 Share on other sites More sharing options...
jon23d Posted October 1, 2009 Share Posted October 1, 2009 I think what you are asking is if you can make another site's flash send data to you? No. They did the hard part, they wrote the flash. Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928289 Share on other sites More sharing options...
trq Posted October 1, 2009 Share Posted October 1, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/176143-a-biggeners-question/#findComment-928316 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.