SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member edpudol's Avatar
    Join Date
    Oct 2004
    Location
    philippines
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cross server include problem

    Is it possible to include a file from my other site to my new site... and call the database from it...

    e.g.

    Site1.com

    varsource.php

    <?php
    $currentCount=100
    ?>

    I am trying to retrieve the value or content of $currentCount variable in my Site2.com but nothing happened.

    <?php
    include "http://www.site1.com/varsource.php";
    echo $currentCount;
    ?>

    I am expecting the script to output 100 but no output come out....

    Thanks in advance for any help....
    Visit us at lexorsoft.net , if you need SEO related services

  2. #2
    SitePoint Evangelist nsj's Avatar
    Join Date
    Oct 2005
    Location
    Jamaica (W.I)
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In short, no..
    THis is because HTML code is generated before it leaves the server so you wont have access to the variables from the other server.

  3. #3
    SitePoint Member edpudol's Avatar
    Join Date
    Oct 2004
    Location
    philippines
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so is there any other way to call get the variable content?
    Visit us at lexorsoft.net , if you need SEO related services


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
  •