elteejay 2 Posted June 17, 2010 Report Share Posted June 17, 2010 What would be the best way to run navigate to where the user wouldn't see where it's navigating to. I'm trying to navigate to an api/post.php script I have setup to where only certain users are allowed to run the bot. It'll then search the page & if Subscription = No, the bot will completely stop. But I'm having trouble trying to find the best way to do this. Anyway to make this all happen in the background? Quote Link to post Share on other sites
Guest Jim Posted June 17, 2010 Report Share Posted June 17, 2010 Here's an example I put together that should be enough for you to work with In my example, I load the google translate page, then secretly submit a translation in an iframe and make a popup with the resulting translated text. secret_iframe_submit_example.ubot Explanation: - navigate to the page we want our user to see (it MUST be on the same domain as the script we're sending data to) - append an iframe to the body of the page with zero'ed width and height (invisible, but still functional!) and the src= set to our script we're sending data to secretly. (http://yoursite.com/auth/check.php?user={1}&pass={2} or something?) - wait a second to let the iframe load - use javascript in an $eval statement to select the newly created iframe, select it's document body, and select an element, and retrieve the results 4 Quote Link to post Share on other sites
Net66 54 Posted June 17, 2010 Report Share Posted June 17, 2010 - navigate to the page we want our user to see (it MUST be on the same domain as the script we're sending data to) - append an iframe to the body of the page with zero'ed width and height (invisible, but still functional!) and the src= set to our script we're sending data to secretly. (http://yoursite.com/auth/check.php?user={1}&pass={2} or something?) - wait a second to let the iframe load - use javascript in an $eval statement to select the newly created iframe, select it's document body, and select an element, and retrieve the results That is pure genius! What a fantastic share. Andy Quote Link to post Share on other sites
Praney Behl 314 Posted July 12, 2010 Report Share Posted July 12, 2010 Absolutely brilliant!! Quote Link to post Share on other sites
Praney Behl 314 Posted July 12, 2010 Report Share Posted July 12, 2010 Hey thanks Mate!! Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted July 12, 2010 Report Share Posted July 12, 2010 Sorry for being dumb but I didnt get this... Can someone explain what the $eval does? (Question from a programming newbie) Quote Link to post Share on other sites
JohnB 255 Posted July 12, 2010 Report Share Posted July 12, 2010 Jim is now the local Wile E. Coyote ("Sooooooper Genius"!) Quote Link to post Share on other sites
pftg4 102 Posted July 12, 2010 Report Share Posted July 12, 2010 He uses the eval funtion to run the java script that sets the varable which is the translated text which is then run in the alert window at the end hope that makes sense Pftg4 ("Sooooooper Genius"!) i second that 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.