hi:
i'm new here and i don't know if i have posted right. I need a program that finds the current ip address from ftps. Can you help me? thanks in advanced. Maria
hi:
i'm new here and i don't know if i have posted right. I need a program that finds the current ip address from ftps. Can you help me? thanks in advanced. Maria
Er, ping should do it -- it displays the IP of the host. Alternatively, a quick-and-dirty method in C:Code:#include <arpa/inet.h> #include <netdb.h> int main(int argc, char **argv) { struct hostent *host; if(argc != 2) { printf("Usage: %s <host>\n", argv[0]); exit(1); } if(!(host = gethostbyname(argv[1]))) { printf("Unable to look up host.\n"); exit(2); } printf("%s\n", inet_ntoa(*((struct in_addr *)(host->h_addr)))); return 0; }
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
well, i don't understand what i have to do to find the current ip address of a ftp. sorry!![]()
I would assume this is the same as your host. So... just look at your hosting account and find the IP.
Or, you could use php. There's a function in that to display the current IP from which the script is running, I believe.
...Ok. Just checked on php.net
Just make a new file, name it something.php and use this as it's contents:Use notepad or another text editor to do this. PHP is just like html, but also is first sent through a php processor on the server, and output as just html. When looking at the webpage's source, ALL you will see, then, is just the IP of the server, which will also be all that is displayed on the page.PHP Code:<?php echo $_SERVER['SERVER_ADDR']; ?>
Note that you need php to be installed/working on your server for the script to run.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
If you are using Windows operating system go to the Command Prompt and type the following command
ping your_ftps_server_domain_name and press enter key
That will solve this.
give me an example, please. thanks in advanced
Go to Start->Run...
Enter "command" and press enter or click OK. In the window that appears, if your server was ftps://www.example.com/, you would type:The program will respond with something like:Code:C:\WINDOWS> ping /n 1 example.comActual output may vary; this is from the linux-netkit variant of the utility. The text in red is the IP address of the server.Code:PING example.com (192.0.34.166) 56(84) bytes of data. 64 bytes from www.example.com (192.0.34.166): icmp_seq=1 ttl=44 time=152 ms --- example.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 152.800/152.800/152.800/0.000 ms
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
how do you find the ip adress of a dinamic ftp?
dynamic ftp? Never heard of that. Can you give an example?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Bookmarks