SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Location
    in ur heart
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post change name of parked domain

    Hey guys. I need a little help in php. my main proxy is pa4.info and 18 other domains are parked on same account. i am using a single file for all which is on the root folder and to change the title on of every domain i am using this code on the top of index.php
    PHP Code:
    $pageUR1 str_replace("/"""$_SERVER["SERVER_NAME"]);
    $pageURL2 str_replace("www."""$pageUR1);
    $pageURL ucfirst($pageURL2); 
    and where there is a need of page title i am using this
    PHP Code:
    <?php echo $pageURL?>
    it should work but it is not working
    see www.pa4.info . it is the main domain and www.pz4.info. it is parked and the name should change but not changing.
    plz help me out. My php version is 4.4.7. I am sure my code is correct
    regards...

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Try $_SERVER['HTTP_HOST']
    PHP Code:
    print $_SERVER['HTTP_HOST']; 
    It should contain the domain name
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Member
    Join Date
    Sep 2007
    Location
    in ur heart
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Try $_SERVER['HTTP_HOST']
    PHP Code:
    print $_SERVER['HTTP_HOST']; 
    It should contain the domain name
    where to add it? plz explain...

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    If you need to ask a question like that then I have to request you learn basic programming basic PHP.
    It is just common sense, not trying to be rude or mean just how life is.

    Give a man a fish he eats for a day. Teach him how to fish he eats forever...or something like that.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    SitePoint Member
    Join Date
    Sep 2007
    Location
    in ur heart
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    If you need to ask a question like that then I have to request you learn basic programming basic PHP.
    It is just common sense, not trying to be rude or mean just how life is.

    Give a man a fish he eats for a day. Teach him how to fish he eats forever...or something like that.
    lolzzzzzz i am an amteur php programmer... just started...... so i was asking if any need to remove any line from above.......
    i dont know why r getting so rude, if I don't know you can post politely otherwise leave it!


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
  •