Results 1 to 2 of 2

Thread: Get iFrame URL and Write It??

  1. #1
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Get iFrame URL and Write It??

    Hi There,

    Does anyone have a code to get the URL from an iFrame inside a PHP page and then write that URL into a variable?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That's not possible like that. PHP does not have access to serverside information. The best you can do is find out the request URI, but that will just give you the page, not whether or not it is in an iframe, etc.

    Javascript can better attempt this but there are security restrictions on information, such as not allowing you to find the URL for an iframe loading a page outside your domain.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •