Barry Sausse 1 Posted May 4, 2011 Report Share Posted May 4, 2011 I was wondering if anyone has tried/succeeded in integrating PHP with UBot via the HTML Panel UI Element? I have been trying to call a php script via Javascript (Yes, this is possible provided the called PHP script returns valid Javascript) from within the HTML Panel element and/or using the Run Javascript node. Anyone else messing around with such ideas? Thanks for sharing! [License:Dev] Quote Link to post Share on other sites
UBotBuddy 331 Posted May 4, 2011 Report Share Posted May 4, 2011 I am shooting from the hip here but it seems to me that PHP is a server-side script. Meaning the server is suppose to do stuff with the special code that exist from the server it is loaded on. Granted, PHP will still work from a Bot just like a normal HTML page but it won't process server-side functions. Those are my thoughts. I have never tested it. However, IF it is possible then that sheds some new light on software that I have that runs on one of my sites. Quote Link to post Share on other sites
Frank 177 Posted May 6, 2011 Report Share Posted May 6, 2011 You've got it 100% Buddy. PHP is a server side language, so one would need a php translator. Ubot only has access to javascript, so to speak, as it's built right into windows. Frank Quote Link to post Share on other sites
Barry Sausse 1 Posted May 7, 2011 Author Report Share Posted May 7, 2011 Hey guys,First of all, thank you for taking the time to read my post and reply! Your insights are much appreciated.I wanted to explain in further detail exactly what it is I am trying to achieve within UBot...I agree that PHP is a server side scripting language. The question I have is pertaining to the client side where the results are being displayed - in the browser, or more specifically in my case, I am interested in the UI HTML component and updating it with said returned results dynamically. I know that Javascript is supported in UBot. So, since Javascript is able to call an external .php script (just like you access an external .js file - as long as the .php script returns valid Javascript code to the browser then this works and is documented), why can't I seem to display the results returned by a .php script, via Javascript, within the UI HTML Component? I have tried using eval(), assigning the results to variables, etc. The code works in the browser fine, but not the UI - I know the UI can be updated after runtime because other components do it all the time, right? (or is this a one-way relationship from UI to script?). I have also tried using XMLHttpRequest Object. all I get is a blank white UI HTML component at runtime. It feels like I am missing something simple like maybe needing to wrap the UI HTML in a thread? I'll try that and see what happens... Thanks again for your replies, not only to this post but to the forum as a whole - I have learned a great deal from both of you. I also enjoy Frank's "Robot Slave Army" a great deal... Valuable information that has saved me countless hours! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted May 7, 2011 Report Share Posted May 7, 2011 I guess the idea would be to have a UI Html element that would be able to call and display the output provided from a .html or .php output html inside the UI html panel attached is a prime example how this could be done to show the results of a php page within the panel for use. The output could be anything from a form, to information, or just a banner if you like. It would mean making it almost like a live browser element for the UI html area. Right now it serves it only as a internal html area. And not a live environment browser area. Attached you will find a iframe for a php filehit the go (play) button to see what it would bring into the top UI html area if it worked in this manner.UI-html-panel-example-lowridertj.ubot Quote Link to post Share on other sites
Barry Sausse 1 Posted May 7, 2011 Author Report Share Posted May 7, 2011 Thanks for the reply and also for the example script! I understand what you mean that the example shows what the UI *would* display if it were a live browser element. However, when I run the script, the browser window always gives me a blank referrer (meaning, no referrer), regardless of where I navigate before running the script...This is true even if I add a node at the beginning of the script that navigates to another URL first before executing the code you provided. The UI panel always remains blank, as expected. Am I doing something wrong? I have The lowest security settings possible in IE, with support for all cookies, scripts etc. enabled...??? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted May 7, 2011 Report Share Posted May 7, 2011 Thanks for the reply and also for the example script! I understand what you mean that the example shows what the UI *would* display if it were a live browser element. However, when I run the script, the browser window always gives me a blank referrer (meaning, no referrer), regardless of where I navigate before running the script...This is true even if I add a node at the beginning of the script that navigates to another URL first before executing the code you provided. The UI panel always remains blank, as expected. Am I doing something wrong? I have The lowest security settings possible in IE, with support for all cookies, scripts etc. enabled...??? that's because that page is just to check your referrer I didn't incorporate a node to set the referrer before it goes to that page. Wasn't the purpose of this example just any display was the purpose. Yes the UI area will remain blank as I said it is not a live browser area. although would be nice. If you want to learn about how to set the referrer search this forum there is a few code samples here. Quote Link to post Share on other sites
Barry Sausse 1 Posted May 8, 2011 Author Report Share Posted May 8, 2011 that's because that page is just to check your referrer I didn't incorporate a node to set the referrer before it goes to that page. Wasn't the purpose of this example just any display was the purpose. Yes the UI area will remain blank as I said it is not a live browser area. although would be nice. If you want to learn about how to set the referrer search this forum there is a few code samples here. Ok, got it! just wasn't sure. Thanks again for your quick replies and help with this matter! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted May 10, 2011 Report Share Posted May 10, 2011 Ok, got it! just wasn't sure. Thanks again for your quick replies and help with this matter! php working and showing as output in html UI window .here you go. not letting me upload right now. think its my pc. have to reboot. structureUI html.- read file...- url to pagepreload-php-in-ui-html-lowridertj.ubot Quote Link to post Share on other sites
Guest leahDyou Posted June 5, 2011 Report Share Posted June 5, 2011 php working and showing as output in html UI window .here you go. not letting me upload right now. think its my pc. have to reboot. structureUI html.- read file...- url to page I don't know if this is what I'm looking for. But there's no harm in trying. thanks +1 Quote Link to post Share on other sites
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.