Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. include question

include question

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
questionphphtmlcombusiness
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    I am trying to use include to place a web page from another webiste on my website using this code but I am just getting it blank! how can I fix this please..

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-us">
    <head>
    <title>Jassim Rahma</title>
    <?php include("tags.php"); ?>
    <meta name="description" content="Where technology meets business intelligence." />
    </head>
    <body dir="ltr" lang="en-us">
    <table width="100%" cellpadding="0" cellspacing="0">
    <tr><td colspan="3" style="border-bottom-color: #D3D3D3; border-bottom-style:solid;; border-bottom-width: thin"><?php include("header.php"); ?></td></tr>
    <tr>
    <td valign="top" style="padding: 10px">
    <?php include("http://www.boutell.com/newfaq/creating/include.html"); ?>
    </td>
    </tr>
    </table>

    <?php include("Piwik.php"); ?>

    </body>
    </html>

    A G M 3 Replies Last reply
    0
    • J Jassim Rahma

      I am trying to use include to place a web page from another webiste on my website using this code but I am just getting it blank! how can I fix this please..

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-us">
      <head>
      <title>Jassim Rahma</title>
      <?php include("tags.php"); ?>
      <meta name="description" content="Where technology meets business intelligence." />
      </head>
      <body dir="ltr" lang="en-us">
      <table width="100%" cellpadding="0" cellspacing="0">
      <tr><td colspan="3" style="border-bottom-color: #D3D3D3; border-bottom-style:solid;; border-bottom-width: thin"><?php include("header.php"); ?></td></tr>
      <tr>
      <td valign="top" style="padding: 10px">
      <?php include("http://www.boutell.com/newfaq/creating/include.html"); ?>
      </td>
      </tr>
      </table>

      <?php include("Piwik.php"); ?>

      </body>
      </html>

      A Offline
      A Offline
      awedaonline
      wrote on last edited by
      #2

      This is how I do this within my site but have not tried the remote side of it.

      include_once $_SERVER['DOCUMENT_ROOT'] . 'aweklin/classes/StringHelper.php';

      1 Reply Last reply
      0
      • J Jassim Rahma

        I am trying to use include to place a web page from another webiste on my website using this code but I am just getting it blank! how can I fix this please..

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-us">
        <head>
        <title>Jassim Rahma</title>
        <?php include("tags.php"); ?>
        <meta name="description" content="Where technology meets business intelligence." />
        </head>
        <body dir="ltr" lang="en-us">
        <table width="100%" cellpadding="0" cellspacing="0">
        <tr><td colspan="3" style="border-bottom-color: #D3D3D3; border-bottom-style:solid;; border-bottom-width: thin"><?php include("header.php"); ?></td></tr>
        <tr>
        <td valign="top" style="padding: 10px">
        <?php include("http://www.boutell.com/newfaq/creating/include.html"); ?>
        </td>
        </tr>
        </table>

        <?php include("Piwik.php"); ?>

        </body>
        </html>

        G Offline
        G Offline
        Gerben Jongerius
        wrote on last edited by
        #3

        You can't do a cross server include like that. PHP include directive only works with files on the same webserver. The way I see it you have two options to solve this: * put the file on the same server and use normal include directives * use the file_get_contents or an iframe to load the external resource

        J 1 Reply Last reply
        0
        • G Gerben Jongerius

          You can't do a cross server include like that. PHP include directive only works with files on the same webserver. The way I see it you have two options to solve this: * put the file on the same server and use normal include directives * use the file_get_contents or an iframe to load the external resource

          J Offline
          J Offline
          Jassim Rahma
          wrote on last edited by
          #4

          I used file_get_conetnts and it's working fine except with some links but I don't know why.. if you check www.JassimRahma.com[^] you'll see all links are working perfectly under my domain but getting external page excet: http://www.jassimrahma.com/16[^] and: http://www.jassimrahma.com/17[^] both from http://www.telegraph.co.uk/[^] what could be the reason?

          1 Reply Last reply
          0
          • J Jassim Rahma

            I am trying to use include to place a web page from another webiste on my website using this code but I am just getting it blank! how can I fix this please..

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-us">
            <head>
            <title>Jassim Rahma</title>
            <?php include("tags.php"); ?>
            <meta name="description" content="Where technology meets business intelligence." />
            </head>
            <body dir="ltr" lang="en-us">
            <table width="100%" cellpadding="0" cellspacing="0">
            <tr><td colspan="3" style="border-bottom-color: #D3D3D3; border-bottom-style:solid;; border-bottom-width: thin"><?php include("header.php"); ?></td></tr>
            <tr>
            <td valign="top" style="padding: 10px">
            <?php include("http://www.boutell.com/newfaq/creating/include.html"); ?>
            </td>
            </tr>
            </table>

            <?php include("Piwik.php"); ?>

            </body>
            </html>

            M Offline
            M Offline
            Mohibur Rashid
            wrote on last edited by
            #5

            This is not including. in php including is far different thing you are trying to do. all you need to use is html tag iframe and in the src attribute use the address.

            J 1 Reply Last reply
            0
            • M Mohibur Rashid

              This is not including. in php including is far different thing you are trying to do. all you need to use is html tag iframe and in the src attribute use the address.

              J Offline
              J Offline
              Jassim Rahma
              wrote on last edited by
              #6

              i would love to... but iframe doest support 100% height and 200% width. so how can i fix it in iframe?

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups