PDA

View Full Version : Computer Programing


Gandalf_uk
28-06-2002, 02:25
Does anybody here know how to program with Borland Delphi. I need a bit of help. what it is...

I'm trying to make a program that will update a website automaticly and need help. (I haven got a clue if you can do it or how to so any help would be grate.)

Nick Shub
28-06-2002, 14:55
I haven't programmed with Delphi so my short answer is: no, sorry I cannot help you.

Longer answer: I might be able to help you, but more information is needed. What is more important to you: automatically updating your website or a program written in Delphi? Is it supposed to be a client-side FTP replacement to upload something to a server or is it supposed to run on server side?

Gandalf_uk
28-06-2002, 14:58
What the program needs to do is get the I.P address of The Computer and update a web site so I can log on to my Friend's Comp Who has a cable modem with a Dinamic I.P by just checking the Site to see what I.P he has. I Have the program getting the I.P address Allredy now i need to know how to up Date a Website Automaticly.

P.S

I think this could be done using Macros But i don't know how to make them and they would also have to work with the Program So everything is Automatic.

Understudy
28-06-2002, 15:11
So just need to FTP the new pages / config files up to the site..?

Gandalf_uk
28-06-2002, 15:12
Yes but i need the Program To do it with out any User Interface.

alexp
29-06-2002, 00:40
any particular reason why Delphi?

This would be a cinch to do with PHP...

Does the web space you are using have PHP and mySQL enabled? If so I could send you some sample code - it would literally take the IP address from one PC like this:

HTTP://www.someplace.com/?password=mypassword&action=log

then if the password is correct, it logs the IP address of the caller. Then all you need to do is go to

HTTP://www.someplace.com/?password=mypassword&action=showme

...and it will tell you the IP address to connect to.

Its probably a cinch to do in Delphi as well, but I'm not familiar with Delphi..

PM or email me if you want any more help

Gandalf_uk
29-06-2002, 00:59
Thx Alex i'll take a look the only Reason i was using Delphi is coz its the only language im familur with (used it for two years now in collage) and again Thx

P.S

Also not shur about PHP and mySQL i would proberly be using AOL to Host it if i can find a way of doing it using that or does anybody know a good but FREE web host?

P.P.S

Delphi also has some SQL Components Not shur what they do or how to use them As i have relay only made Basic programs B4

inVurt
29-06-2002, 01:33
IIRC, starting with Delphi 5 or Borland started shipping web components. There should be an FTP component.

All you really need to do once you've gotten the IP addy of your computer, is generate a text file where you build the .html file that is going to go on the web site, in which you put the IP address, and whatever else you want. I'd recommend just building the thing line by line in a stringlist, and saving it to file.

So figure out what your web-page needs to look like, and then use strings to build it inside of Delphi, adding in the IP dynamically. Put each line in a stringlist, and use the savetofile method? Something like that.

Once you've got the file, you should monkey around with the FTP component to figure out how to use it to put the file on the server. And I apologize, but I haven't played with this at all in Delphi, but it should be pretty straight forward.

Best of luck!

-- inVurt

Gandalf_uk
29-06-2002, 01:37
Thx Very Big help now i know what to look up :)

Nick Shub
29-06-2002, 01:37
Hmm. Maybe your friend needs something like this: http://www.dyndns.org/ and you wouldn't need to worry about IP's. Using Delphi to create a solution I cannot help you with.:(

And I hope nobody uses Alexp's example in RL, it is totally unsecure...

Gandalf_uk
29-06-2002, 01:40
Yes he has signed up for DNS2GO but he will forget to load it up and also it gaveis me a chalange (something to do while im off Collage B4 i Hopefuly Start Uni Makeing it)

Zrbyte
29-06-2002, 03:15
FYI I am going to be hosting our little server, and have already registered for a DNS2GO domain. This will be the method that I will be hosting my server but in a conversation with my friend Gandalf I asked would it be at all possible to build a proggy in delphi that would automatically update my IP to a predetermined website at intervals of about 1hr.

Gandalf_uk
29-06-2002, 03:17
BTW its nearly Finnishe now :)

Zrbyte
29-06-2002, 03:26
Damn, your up late. Don't you have work tomorrow??

Nick Shub
29-06-2002, 12:26
Originally posted by Gandalf
BTW its nearly Finnishe now :)

Ah, nice to hear this m8.:)

BTW is that website going to be a public one? If so what's going to be the content/topic and can we have a link?;)

Zrbyte
29-06-2002, 13:55
It's not really going to be a website, the website Idea was just to post my IP on. However I will be hosting a Private FTP server, unfortunatley my upload speed sucks so the server is only really efficient for one or maybe two people.
As for the general theme... I dont think there is one, just anything gandalf needs to get from the net regardless of size he can download using my connection 512k Cable, then at his leasure he can then download from me at a slower rate of a 56k modem. this is basicly like having his own private server.

Gandalf_uk
29-06-2002, 21:15
Aren't I lucky :)

alexp
01-07-2002, 10:14
@nick shub - it was an illustration. What is there to be insecure about?, all you are doing is reflecting an IP address. It hardly needs to be fort Knox does it?