SRL Archive - Delphi/FPC Help and Tutorials

request: GetPage(site: string): string;


marpis

2010-01-20 03:50:43

Please write this for me :(
I need it in my plugin. I will use it in an authing function, I'm going to sell a script I wrote.

If you make me a working one, I can obfuscate/host authing service for you if you want to sell a script sometime :garfield:

Bonfield

2010-01-20 03:55:13

I will give his a go when I get home, just curious what script are you selli g

marpis

2010-01-20 03:56:45

From: Bonfield
I will give his a go when I get home, just curious what script are you selli g


250k GP/hr, F2P.
That's all I tell for now. ;)

nielsie95

2010-01-20 04:37:44

Take a look at the Simba source or use TidHTTP from Indy: string := idHTTP.get('http://www.google.com');

Cazax

2010-01-20 11:15:23

function GetPage(site: string): WideString; //By RsN
var
ie, fh: HINTERNET;
lpBuffer: array[0..1024+1] of Char;
dwBytesRead: DWORD;
begin
ie := InternetOpen('Client', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
fh := InternetOpenUrl(ie, PChar(site), nil, 0,
INTERNET_FLAG_RELOAD, 0);
if Assigned(fh) then
while True do
begin
dwBytesRead := 1024;
Application.ProcessMessages;
InternetReadFile(fh, @lpBuffer, 1024, dwBytesRead);
if dwBytesRead = 0 then
Break;
lpBuffer[dwBytesRead] := #0;
Application.ProcessMessages;
Result:= Result + lpBuffer;
end;
InternetCloseHandle(fh);
InternetCloseHandle(ie)
end;
That's what I found, don't remember what Uses it needs though…

Wizzup?

2010-01-20 12:51:58

From: nielsie95
Take a look at the Simba source or use TidHTTP from Indy: string := idHTTP.get('http://www.google.com');


That^.
You need Synapse, and compact and fast lib. It is also in the Simba repos.

Bonfield

2010-01-21 01:10:38

Seems like this has been taken care of, so where will you be selling?

marpis

2010-01-21 09:46:43

[Fatal Error] Unit1.pas(7): File not found: 'IdHTTP.dcu'

Neither did it find winlnet :(
What to do?

nielsie95

2010-01-21 09:58:35

Looks like you don't have Indy library. Download it or use Synapse as Wizzup proposed.

mastaraymond

2010-01-21 10:00:02

What compiler are you using anyway?

marpis

2010-01-21 11:26:49

From: mastaraymond
What compiler are you using anyway?


Delphi7SE

mastaraymond

2010-01-21 12:11:45

From: marpis
Delphi7SE

Yep, that isn't delivered with Indy components.

So you have to install either Synapse or Indy

caused

2010-01-21 18:29:17

Go with Indy.

Theres even an installer for those components, which is just click n' play.

Indy got tons of components you may find useful ;)…

~caused

mastaraymond

2010-01-22 06:58:47

From: caused
Go with Indy.

Theres even an installer for those components, which is just click n' play.

Indy got tons of components you may find useful ;)…

~caused

Indy however is quite a heavy component….