I'm working on a Delphi program designed for use with an Access database. In addition to the onscreen output, however, my boss wants me to provide PHP reports for it as well. We have PHP installed on our servers, so that's good, but the database in question is installed on the client box in this scenario; it'll be on the same box as my Delphi system is running on. In order to get the PHP page to read it, at the very least I'll need to be able to have the Delphi program pass the IP address of the system it's running on to the PHP page it's calling. How would I go about using Delphi to find this information?
EnderX
352
Posting Shark
Recommended Answers
Jump to PostI'm working on a Delphi program designed for use with an Access database. In addition to the onscreen output, however, my boss wants me to provide PHP reports for it as well. We have PHP installed on our servers, so that's good, but the database in question is installed on …
Jump to Postfor Delphi 2009
uses Winsock; const WINSOCK_VERSION = $0101; function GetIPAddress(name: AnsiString): string; const WSVer = $101; var wsaData: TWSAData; P: PHostEnt; begin Result := ''; if WSAStartup(WSVer, wsaData) = 0 then begin begin P := GetHostByName(PAnsiChar(name)); if P <> nil then Result := iNet_ntoa(PInAddr(p^.h_addr_list^)^); end; WSACleanup; …
All 5 Replies
ExplainThat
1
Junior Poster in Training
Member 784101
0
Newbie Poster
Wolfgan
17
Junior Poster
Member 784101
0
Newbie Poster
Wolfgan
17
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.