Remote HTM not printing via PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry Guys for the previous ignorant Q I thought I was emailing the Help desk, do forgive.
================================================================

I am trying to print a remote header menu in a html page without frames.

The client side JS in located in this htm. ( http://www.dtcc.com/ThoughtLeadership/menu.htm )

I tried both INCLUDE, REQUIRE  with no avail. I am  a complete novice beginner so can anyone help me a bit please?

The code I tried:
==============================

</HEAD>
<BODY BGCOLOR=#FFFFFF background="images/bgb.gif" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="778" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="images/1_12.gif">
 <?php

    $filename = 'http://www.dtcc.com/ThoughtLeadership/menu.htm';
    print getRandomLine($filename);

    function getRandomLine($filename) 
    {
    global $errors;

      if (file_exists($filename)) {

        mt_srand ((double) microtime() * 1000000);
        $lines = file($filename);

        $line_number = mt_rand(0,sizeof($lines)-1);
        return $lines[$line_number];

      } else {
        $errors['getRandomLine'][] = "File: $filename not found";
        return FALSE;
      }
    }
  ?>
</td>
  </tr>
  <tr>
    <td width="778" background="images/1_12.gif">&nbsp;</td>

...& On it Goes

============================

Can you please let me know why can't print the remote HTM  in the current page (Though it is in a different domain)?

Thanks,

Chirantan
NYC
p2ren[at]aol[dot]com


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux