SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Reading AccessDatabase?

    Hey all just a quick question, im kinda new to php only done one real script, anyway i wanted to know if there was a way to read a random line off a .mdb file from anotehr server? sounds funny i know but its for a quote script

    also if that doesnt work is ther an easier way to use an include to just read the quote part on a site or certain lines?

  2. #2
    SitePoint Member
    Join Date
    Jun 2002
    Location
    Denver, CO
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Generally speaking - very, very unlikely.

    First, your PHP install needs support for Access; near as I can see, ODBC is the only way. I'll guess you're on a shared ISP server rather than your own, so I'll bet ODBC support doesn't exist.

    Second, I'll bet ODBC requires NetBIOS over TCP/IP, and no ISP allows that.

    Third, you need full cooperation from the Admin hosting the .MDB.

    Fourth, just one firewall between the two sites that you don't have the ability to configure will block this.

    It might be possible, but the obstacles are high.

  3. #3
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh ok well that does help i do know the admin of the other site (personal friend) and my site your right doesnt have ODBC but ill try to see if i can have him print em to a text file would that be easier to store on my site and read a random line from?

  4. #4
    SitePoint Zealot JEmLAC's Avatar
    Join Date
    Apr 2002
    Location
    Kansas City
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mouse_me, I've done this exact thing: pull a random quote from an Access table and put it on a web page. I used ASP and the database was local so there are two things that are different right off the bat. However, this sounds like something you might like to try with XML/XSLT, if you're interested in getting into those technologies. I'm not terribly familiar with PHP (yet), but I understand its support for XML is pretty good. For something simple like a table of quotes, it would be pretty simple to set up the structure of the document. The fun would be in writing the transform. Nothing teaches you a new technology like having a (simple) project with some relevance to you.
    Morning person by habit, not by nature.


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
  •