1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to dyanmically change text from one file across multiple domains?

Discussion in 'General Programming Chat' started by superaff1984, Mar 15, 2011.

  1. superaff1984

    superaff1984 Power Member

    Joined:
    Jun 16, 2010
    Messages:
    619
    Likes Received:
    20
    Location:
    West Los Angeles, CA
    How can I insert something on our site where we can change the name of a product across multiple domains? I'm hoping to do this through PHP. I need to have one file that I can update. This one file will change the brand name of a product across several sites registered under different domains?
     
  2. zelma143

    zelma143 Power Member

    Joined:
    Jun 25, 2010
    Messages:
    571
    Likes Received:
    37
    Occupation:
    PHP programmer,Bot maker,iMacro script maker
    use rand() to choose dynamic value.. :)
     
  3. BigLarry

    BigLarry Regular Member

    Joined:
    Mar 2, 2011
    Messages:
    218
    Likes Received:
    144
    I'd look at perhaps creating a database with the data in then allowing all your different hosting packages access to read and display the values you need.

    If you don't want to go down the database route, you could use fopen to read in a simeple text file on one of your domains and then show whatever is in the text file accordingly.
     
  4. wkrappen91

    wkrappen91 Power Member

    Joined:
    Sep 9, 2010
    Messages:
    588
    Likes Received:
    720
    Location:
    127.0.0.1
    take a look at PHP Include
    make it:
    <?php include("http://someurl.com/somefile.php");?> on all the sites.
    Now you just have to change whatever is inside somefile.php
     
  5. Stalli0n

    Stalli0n Junior Member

    Joined:
    Nov 17, 2010
    Messages:
    115
    Likes Received:
    83
    Location:
    Europe
    Would be good to know where the product name is stored on your sites.

    :rolleyes: