whitedragond Posted April 11, 2008 Share Posted April 11, 2008 Ok, so I've been thinking about a problem and was wondering... On my page, I can open a link in a new window, using a target or whatever. After the popup is loaded, is there way (from the source page) to go into that popup and read what html has been generated? example: http://www.<server>.com/popup.php That page would generate a popup/new window linking to phpfreaks.com. On that page, it shows my login time: Total time logged in: 34 minutes. So I would want my popup.php page to open that window and then read in how long I've been logged in. Any ideas? thanks Quote Link to comment Share on other sites More sharing options...
rhodesa Posted April 11, 2008 Share Posted April 11, 2008 No, you can only access information in popups (via JavaScript) if the popup is from the same host. It's a security risk to allow otherwise. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted April 11, 2008 Share Posted April 11, 2008 You could read the contents of the popup(that is, the webpage the popup contains) with PHP, either with file_get_contents() or with cURL You could use some AJAX to link to a file which does the above, and updates your main page. Seems a touch pointless though. Quote Link to comment 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.