1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

LF PHP Script Proxy?

Discussion in 'PHP' started by fetal, Jun 3, 2017.

  1. #1
    Hello,
    I'm looking for a php scfript that will work as a proxy to hit a website by passing DNS. For example, lets say I'm doing development work on another server on ip 8.8.8.8, but the live site is on ip 8.8.4.4. I'd like this proxy script to hit the 8.8.8.8 so I don't have to edit my hosts file.

    Does such thing exist? Or what would this be called?
    SEMrush
    Any help much appreciated.
     
    fetal, Jun 3, 2017 IP
    SEMrush
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Why don't you just add a dev-subdomain or something? I still don't really understand why this would matter, regardless - if you're doing the dev-work externally, why does it matter what DNS you have? Especially if it's a separate server - just call the site something else for the DNS-request - it shouldn't matter what it's called for the site itself, so... I don't really understand why this is a problem.
     
    PoPSiCLe, Jun 3, 2017 IP
  3. fetal

    fetal Member

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Thanks for the response.

    But CMS's like Wordpress, have the site URL get hard coded into the database. It would be less work for me if I could setup a site with the true URL. And then give my clients a URL to preview it. changing the hosts file is fine for me, but I'd rather not have to explain it to the client.
     
    fetal, Jun 3, 2017 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Ah, I see - yet another shortcoming for WP (there is no reason the full site URL should be stored in the database, of course - just the specific - not http://example.com/test, just /test). But okay, then you will need something else, yes. However, a simple search/replace on the database will fix that.
     
    PoPSiCLe, Jun 3, 2017 IP
  5. fetal

    fetal Member

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Yup. yeah, I can be done in it's current state, but a php script or something would work a lot better. I wonder if something could be made to do this.
     
    fetal, Jun 4, 2017 IP