Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2010
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Fetching content

    If I want to take some content from my blog database to put it on my home page, and both reside on the same server, do I need additional authentication? (Mostly yes, I guess).

    Would it mess with my blogs working?

    Also, can PHP fetch output after executing a Python script (which is on /cgi-bin) directly?

    Cheers.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    Your database (MySQL) is a portion of the server's storage reserved for you.
    Separate from your website. You'll notice that the PHP scripts log into the database
    using host, username, password, etc. Just like you log into your website using FTP.

    So, any PHP script on your website (or the same server) can access any of the
    MySQL databases if you know the account login for the database. That means you
    can do anything you want with your data from any PHP script. You could even add
    another table to your blog database if you wish ... to be used for another purpose.

  • #3
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Short answer, yes you can access a database which resides on your server if you have the connection info. Your blogs won't be affected unless the load on your database gets too heavy. That probably will not be an issue unless your blog is really really popular.

    And yes, PHP can fetch data.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •