Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Web page reading and coping help?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
blqxxxxxxx
Cheater
Reputation: 0

Joined: 25 Aug 2009
Posts: 37

PostPosted: Thu Apr 08, 2010 12:12 pm    Post subject: Web page reading and coping help? Reply with quote

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
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Fri Apr 09, 2010 4:08 am    Post subject: Reply with quote

How about parsing the ip using regex.
Since it's html you could also use a html parser Smile

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
blqxxxxxxx
Cheater
Reputation: 0

Joined: 25 Aug 2009
Posts: 37

PostPosted: Fri Apr 09, 2010 4:24 am    Post subject: Reply with quote

I can't understand what do you mean Embarassed 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
View user's profile Send private message
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Fri Apr 09, 2010 5:40 am    Post subject: Reply with quote

I'm pretty sure you can get the IP address from a winsock control.
Back to top
View user's profile Send private message
blqxxxxxxx
Cheater
Reputation: 0

Joined: 25 Aug 2009
Posts: 37

PostPosted: Fri Apr 09, 2010 8:19 am    Post subject: Reply with quote

_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
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Fri Apr 09, 2010 12:16 pm    Post subject: Reply with quote

Cryoma wrote:
How about parsing the ip using regex.


Mandatory read.
Back to top
View user's profile Send private message
blqxxxxxxx
Cheater
Reputation: 0

Joined: 25 Aug 2009
Posts: 37

PostPosted: Mon Apr 12, 2010 2:43 pm    Post subject: Reply with quote

I found what i need Smile I use functions[pos,trim and etc..] now you can lock the topic Razz

Kind regards megaz0r
Back to top
View user's profile Send private message
Cheat Engine User
Something epic
Ban
Reputation: 60

Joined: 22 Jun 2007
Posts: 2071

PostPosted: Mon Apr 12, 2010 3:18 pm    Post subject: Reply with quote

http://whatismyip.org/
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Thu Apr 15, 2010 2:57 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Thu Apr 15, 2010 4:17 am    Post subject: Reply with quote

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. Laughing

You've got a problem. You decide to solve it with regex. Now you have two problems.
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Mon Apr 19, 2010 3:29 am    Post subject: Reply with quote

Flyte wrote:
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. Laughing

You've got a problem. You decide to solve it with regex. Now you have two problems.

Maby becuase I get it to work on every project?

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Mon Apr 19, 2010 4:48 am    Post subject: Reply with quote

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
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Mon Apr 19, 2010 6:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites