* * *

Author Topic: NDS, GBA cuntformist of fcl & LCL. so help us socket gods  (Read 1206 times)

year-0096ic

  • Newbie
  • Posts: 1
NDS, GBA cuntformist of fcl & LCL. so help us socket gods
« on: December 16, 2014, 07:38:12 pm »
//This is has nds bin
//sit on my babies presentation
program pillage; // the internet, global village

{$mode objfpc}{$H+}

uses
  SysUtils, Classes, fphttpclient, ctypes, nds9, dswifi9;


function Inreq(Title: string):string;
var
 data: array [0..255] of char;
  begin
  iprintf('What is the %s'#10 ,PChar(Title));

  scanf('%s', data);
  scanKeys();
  while (keysDown() = 0)do
  scanKeys();

  swiWaitForVBlank();
  consoleClear();
  result:= data;
  end;

procedure OnKeyPressed(key: cint);
begin
  if (key > 0) then
    iprintf('%c', key);
end;

var
  kbd: pKeyboard;
  i : Integer;
  Str1,Str2: string;
  THTTPCli:TFPHTTPClient;
begin
{  if (ParamCount<>2) then
    begin
    writeln('Usage : ',ExtractFileName(ParamStr(0)), 'URL filename');
    Halt(1);
    end; }

  kbd :=  keyboardDemoInit();
  kbd^.OnKeyPressed := @OnKeyPressed;

  consoleDemoInit();  //setup the sub screen for printing

   iprintf(#10#10#9'Setting Wifi Connection'#10#10);
    if not Wifi_InitDefault(WFC_CONNECT) then
      iprintf('Failed to connect!')
   else
    try
     iprintf('Connected via WFC data ...'#10);
      THTTPCli := TFPHTTPClient.Create(Nil);
      str1:= Inreq('URL');
//      str2:= Inreq('Param 2');
      iprintf(PChar(THTTPCli.Get(str1)));
//      Writeln('Response headers:');
//      For I:=0 to THTTPCli.ResponseHeaders.Count-1 do
//        iprintf(PChar(THTTPCli.ResponseHeaders));
    finally
      THTTPCli.Free;
    end;

     while true do swiWaitForVBlank();
end.
//the pro-litter-riot's sklaven
//KennyD
mailto:undeadkennyd@hotmail.com

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus