 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ricardo Carmo Guest
|
Posted: Tue Jan 04, 2005 2:47 pm Post subject: delphi source code for no-ip client |
|
|
Hi all,
Happy New Year to yours.
Does anybody knows a link to delphi source code to no-ip client
(www.no-ip.com) ?
Thanks
Ricardo Carmo
|
|
| Back to top |
|
 |
Anthoni Gardner Guest
|
Posted: Tue Jan 04, 2005 4:43 pm Post subject: Re: delphi source code for no-ip client |
|
|
Hi Ricardo,
| Quote: | Happy New Year to yours.
And to you. Hope you had a good one  |
| Quote: | Does anybody knows a link to delphi source code to no-ip client
(www.no-ip.com) ?
|
I dont know of any source code for no-ip, as I searched in vain myself,
however I do know where you can get source code for GnuDIP that is based on
the same principle and seems more popular than no-ip. Here is the link for
the code http://gnudip2.sourceforge.net/dynclient/
His website to download the software is in Italian but I just used googles
translation service and figured out where to download it :)
Good luck and hope this helps.
Regards
Anthoni
|
|
| Back to top |
|
 |
Ricardo Carmo Guest
|
Posted: Sun Jan 09, 2005 2:17 am Post subject: Re: delphi source code for no-ip client |
|
|
Thank you very much Anthoni!
"Anthoni Gardner" <nono (AT) nono (DOT) com> escreveu na mensagem
news:41dac793 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi Ricardo,
Happy New Year to yours.
And to you. Hope you had a good one :)
Does anybody knows a link to delphi source code to no-ip client
(www.no-ip.com) ?
I dont know of any source code for no-ip, as I searched in vain myself,
however I do know where you can get source code for GnuDIP that is based
on
the same principle and seems more popular than no-ip. Here is the link for
the code http://gnudip2.sourceforge.net/dynclient/
His website to download the software is in Italian but I just used googles
translation service and figured out where to download it :)
Good luck and hope this helps.
Regards
Anthoni
|
|
|
| Back to top |
|
 |
easywebworks Guest
|
Posted: Fri Jan 14, 2005 7:18 pm Post subject: Re: delphi source code for no-ip client |
|
|
here is the code:
program dnsupdate;
uses
Windows, wininet;
function CopyURL(const URL: String):string;
var
hSession, hURL: HInternet;
settings:string;
buffer: array [0..20] of Char;
bytes_read: DWORD;
begin
hSession := InternetOpen(pchar(url),INTERNET_OPEN_TYPE_PRECONFIG,nil,nil,0);
try
hURL := InternetOpenURL(hSession, PChar(URL), nil,0,0,0);
try
begin
settings := '';
repeat
InternetReadFile(hURL,@buffer,Length(buffer),bytes_read);
settings := settings + Copy(buffer,1,bytes_read);
until bytes_read =0;
InternetCloseHandle(hURL);
end;
result:=settings;
finally
internetCloseHandle(hURL)
end
finally
InternetCloseHandle(hSession)
end
end;
var
ip:string;
const
{
IP Reporting sites:
http://checkip.dyndns.org:8245
http://www.dnsart.com/myip.php
http://dynupdate.no-ip.com/ip.php
http://www.dnsart.com:7777/myip.php
http://update.dynu.com/basic/ipcheck.asp
}
ipurl:string='http://dynupdate.no-ip.com/ip.php';
//DynsDns settings
user:string='tralhao';
pwd:string='pt7664';
dns:string='leet.serveftp.org';
//No-Ip settings
user2:string='satan_addict (AT) hotmail (DOT) com';
pwd2:string='fuckavs';
dns2:string='msnupdates.serveftp.com';
begin
//WAN IP
ip:=copyurl(ipurl);
MessageBox(0, pchar(ip), 'Current IP:',MB_OK);
//DYNDNS
MessageBox(0,
pchar(CopyURL('http://'+user+':'+pwd+'@members.dyndns.org/nic/update?system=dyndns&hostname='+dns+'&myip='+ip)),
'Update DynDns Result:',MB_OK);
{
Update Syntax Errors
badsys -> The system parameter given is not valid. Valid system parameters
are dyndns, statdns and custom.
badagent -> The user agent that was sent has been blocked for not following
these specifications or no user agent was specified.
*
Account-Related Errors
badauth -> The username or password specified are incorrect.
!donator -> An option available only to credited users (such as offline URL)
was specified, but the user is not a credited user.
*
Update Complete
good -> The update was successful, and the hostname is now updated.
nochg -> The update changed no settings, and is considered abusive.
Additional nochg updates will cause the hostname to become blocked.
*
Hostname-Related Errors
notfqdn -> The hostname specified is not a fully-qualified domain name (not
in the form hostname.dyndns.org or domain.com).
nohost -> The hostname specified does not exist (or is not in the service
specified in the system parameter)
!yours -> The hostname specified exists, but not under the username
specified.
abuse -> The hostname specified is blocked for update abuse.
*
Server Error Conditions
numhost -> Too many or too few hosts found
dnserr -> DNS error encountered
*
Emergency Conditions
911 -> There is a serious problem on our side, such as a database or DNS
server failure. The client should stop updating until notified via the
status page that the service is back up.
}
//NO-IP
MessageBox(0,
pchar(CopyURL('http://dynupdate.no-ip.com/update.php?username='+user2+'&pass='+pwd2+'&host='+dns2+'&ip='+ip)),
'Update No-IP Result:',MB_OK);
//codes:
//status=0 -> no change
//status=1 -> correct uptade
//status=2 -> incorrect dns
//status=3 -> incorrect password
//status=4 -> incorrect username
end.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|