View previous topic :: View next topic |
Author |
Message |
blqxxxxxxx Cheater
Reputation: 0
Joined: 25 Aug 2009 Posts: 37
|
Posted: Thu Apr 08, 2010 12:12 pm Post subject: Web page reading and coping help? |
|
|
Hi guys. I need some help. I have to check the ip on computers, BUT my friend have a dynamic ip so i have to use web page to view his real ip. [DELPHI PROGRAMMING] I have webbrowse1, who browse the page and when i click button1 i received in memo code of the page.
Code: | ...........
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=description content=[">>>XXX.XXX.X.XXX<<<"] [I NEED THIS]-Austria IP information. IP Tracer and IP Tracker and other DNS Tools.">
<META name=keywords content="XXX.XXX.X.XXX, Austria IP address, ......... |
I don't know how to copy this in edit1. Can some one help me?
Kind regards Megaz0r |
|
Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
|
Back to top |
|
 |
blqxxxxxxx Cheater
Reputation: 0
Joined: 25 Aug 2009 Posts: 37
|
Posted: Fri Apr 09, 2010 4:24 am Post subject: |
|
|
I can't understand what do you mean anyway
now i use other site, which is better and all code is this:
Code: | <HTML><HEAD><TITLE>Current IP Check</TITLE></HEAD>
<BODY>Current IP Address: 111.111.111.111 </BODY></HTML> |
How to copy this ip in edit1? |
|
Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Fri Apr 09, 2010 5:40 am Post subject: |
|
|
I'm pretty sure you can get the IP address from a winsock control. |
|
Back to top |
|
 |
blqxxxxxxx Cheater
Reputation: 0
Joined: 25 Aug 2009 Posts: 37
|
Posted: Fri Apr 09, 2010 8:19 am Post subject: |
|
|
_visiON_ wrote: | I'm pretty sure you can get the IP address from a winsock control. |
I know for the dynamic ip you need to use a web site and you need to read from this page and write this information to memo,edit and etc... if you can show me how to check the ip with winsock control will be good xD. btw i know how to work with this function
Code: | function GetIPFromHost
(var hostname, ipaddr, wsaerr: string): Boolean;
type
Name = array[0..100] of char;
pname = ^name;
var
hent: phostent;
hname: pname;
wsadata: twsadata;
i: integer;
begin
result := false;
if wsastartup($0101, wsadata) <> 0 then begin
wsaerr := 'winsock is not responding."';
exit;
end;
ipaddr := '';
new(hname);
If gethostname(hname^, sizeof(name)) = 0 then
begin
hostname := strpas(hname^);
hent := gethostbyname(hname^);
for i := 0 to hent^.h_length - 1 do
ipaddr :=
concat(ipaddr,
inttostr(ord(hent^.h_addr_list^[i])) + '.');
setlength(ipaddr, length(ipaddr) - 1);
result := true;
end
else begin
case wsagetlasterror of
wsanotinitialised:wsaerr:='wsanotintialised';
wsaenetdown:wsaerr:='wsaenetdown';
wsaeinprogress:wsaerr:='wsaeinprogress';
end;
end;
dispose(hname);
wsacleanup;
end; |
Kind regards megaz0r |
|
Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Fri Apr 09, 2010 12:16 pm Post subject: |
|
|
Cryoma wrote: | How about parsing the ip using regex. |
Mandatory read. |
|
Back to top |
|
 |
blqxxxxxxx Cheater
Reputation: 0
Joined: 25 Aug 2009 Posts: 37
|
Posted: Mon Apr 12, 2010 2:43 pm Post subject: |
|
|
I found what i need I use functions[pos,trim and etc..] now you can lock the topic
Kind regards megaz0r |
|
Back to top |
|
 |
Cheat Engine User Something epic
Reputation: 60
Joined: 22 Jun 2007 Posts: 2071
|
|
Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Thu Apr 15, 2010 2:57 am Post subject: |
|
|
Flyte wrote: | Cryoma wrote: | How about parsing the ip using regex. |
Mandatory read. |
lol.
I have done it so wtf are you on?
I parsed ip from whatsmyip.org using regex... _________________
Intel over amd yes. |
|
Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Thu Apr 15, 2010 4:17 am Post subject: |
|
|
Cryoma wrote: | lol.
I have done it so wtf are you on?
I parsed ip from whatsmyip.org using regex... |
Just because it works in a limited case doesn't mean it's correct, which is the whole point of that post. I don't have anything against regex - it has some great uses. The problem is, is that when a newbie first discovers regex they want to use it for every problem they come across. It's also a large reason why Perl is a write-only language.
You've got a problem. You decide to solve it with regex. Now you have two problems. |
|
Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
|
Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Mon Apr 19, 2010 4:48 am Post subject: |
|
|
Cryoma wrote: | Maby becuase I get it to work on every project? |
Haha. I see. You're one of 'those' people. Have fun I guess - it's only broken code, not the end of the world. |
|
Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Mon Apr 19, 2010 6:11 am Post subject: |
|
|
Flyte wrote: | Cryoma wrote: | Maby becuase I get it to work on every project? |
Haha. I see. You're one of 'those' people. Have fun I guess - it's only broken code, not the end of the world. |
dude. My code ain't broken <.<
And isn't this getting quite off topic. _________________
Intel over amd yes. |
|
Back to top |
|
 |
|