English
Source / code snippets

Results Date Googleajaxsearchresultstolist Search

 
googleAjaxSearchResultsToList Date Search Results

Download


CompileMarkSeparation
 {$cleq}
 {$compiler c:\dev\xprofan11\11}
 {$runtime c:\dev\xprofan11\11}
string s=input$("Suche:","Suche:","XProfan")
case s=="" : end
clearList
googleAjaxSearchResultsToList(s)
listbox$("Ergebnisse:",1)
end

googleAjaxSearchResultsToList(string src){

    downloadFile("https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q="+urlEncode(src))

    while %Loading{sleep 100}

    strings a
    a=explode($download,"\qGsearchResultClass\q")
    long c=sizeOf(a),d

    whileloop 0,c-1 {

        src=substr$(substr$(a[loop],2,"\qunescapedUrl\q:\q"),1,"\q")
        casenot src=="" : addString src
        d+

    }

    return d

}

Proc urlEncode

    Parameters String$
    Declare I&,Char%,Urlpathencode$
    Urlpathencode$ = String$
    declare Urlencode$

    Whileloop Len(Urlpathencode$),1,-1

        Char% = Ord(Mid$(Urlpathencode$,&Loop,1))

        If ((Char%>96) And (Char%<123))

        Elseif ((Char%>47) And (Char%<58))

        Elseif ((Char%>64) And (Char%<91))

        Elseif ((Char%>44) And (Char%<48))

        Elseif (Char% = 95)

        Elseif (Char% = 126)

        Elseif (Char% = 38)

        Elseif (Char% = 58)

        Elseif (Char% = 63)

        Elseif (Char% = 64)

        Elseif (Char% = 35)

        Elseif (Char% = 33)

        Elseif (Char% = 36)

        Elseif (Char% = 42)

        Elseif (Char% = 43)

        Else

            If (&Loop=1)

                Urlencode$ = "%" + Hexx(Char%) + Mid$(Urlencode$,&Loop+1,Len(Urlencode$))

            Elseif (&Loop=Len(Urlencode$))

                Urlencode$ = Left$(Urlencode$,&Loop-1) + "%" + Hexx(Char%)

            Else

                Urlencode$ = Left$(Urlencode$,&Loop-1) + "%" + Hexx(Char%) + Mid$(Urlencode$,&Loop+1,Len(Urlencode$))

            Endif

        Endif

    Wend

    Return Urlpathencode$

Endproc

Proc Hexx

    Parameters Zahl&

    If (Zahl&>15)

        Return Hex$(Zahl&)

    Else

        Return "0"+Hex$(Zahl&)

    Endif

Endproc


1.169 kB
Hochgeladen:05/12/13
Downloadcounter176
Download
5 kB
Hochgeladen:05/12/13
Downloadcounter196
Download
 
05/12/13  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.719 Views

Untitledvor 0 min.
p.specht11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
Wilfried Friebe11/17/21
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie