SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    May 2003
    Location
    Lanka
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question show inc.php file from an other server

    I want show html content of a inc.php flie in a different(remote) server
    I tried to do it like this but didn't work--

    $fileLoc ="http://www.resellerlabs.com/incfiles/R001014.inc.php" ;

    $read = fopen($fileLoc,"r");

    $content = fread($read,filesize($fileLoc));

    fclose($read);

    echo"$content";

    please someone tell me why it doesn't work or better way

    Thanks
    ------------------
    hasitha

  2. #2
    SitePoint Zealot nsr81's Avatar
    Join Date
    Nov 2002
    Location
    B'klyn, NY
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's because webserver will never let you see the PHP code of a *.php file. All php files are parsed by php before the output is sent to the browser. (given that a webserver is setup to handle php files properly)

    So if you are trying to take a peek at resellerlabs.com's passwords and stuff, you won't succeed.
    Nasir
    nasir.us

  3. #3
    Non-Member Icheb's Avatar
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    1,474
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He wants to show the HTML output, not get the PHP code.

  4. #4
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Icheb
    He wants to show the HTML output, not get the PHP code.
    The HTML output is a 404. I doubt it was meant for public consumption.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  5. #5
    SitePoint Member
    Join Date
    May 2003
    Location
    Lanka
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the file I want to show is a footer file(the inc.php file) I just want to call that file to an anthor domain
    which parcked in anther sever(just the html output)

    ------------------------
    hasitha


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
  •