Jump to content

Herhangi Bir Sayfanın Başlığını Almak


turkoglu98
 Share

Recommended Posts

bir projemde herhangi bir sayfanın başlığını almam gerekiyordu kodu buldum
ve sizlerle paylaşmak istedim


öncelikle bir imput'a ihtiyacımız var
imputun ismi = link olucak

ve kodları imputun On Key bölümüne yazıcaz

[codebox]if e_Key == 13 then
link = Input.GetText("link"); -- linki al
html = HTTP.Submit(link, {}, SUBMITWEB_GET, 20, 80, nil, nil); -- linkteki adresin htmlsini al
title = String.Find(html, "<title>", 1, false); -- arama yap
sol = String.Left(html, title); -- soldan itibaren al
nsol = String.Replace(html, sol, "", false); -- sol tarafı sil
atitle = String.Find(nsol, "</title>", 1, false); -- araba yap
sag = String.Left(nsol, atitle); -- soldan itibaren al
asol = String.Replace(sag , "title>", "", false); -- geriye kalanları sil
bsol = String.Replace(asol , "<", "", false); -- geriye kalanları sil
result = Dialog.Message("sitenin başlığı",bsol, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); -- sitenin başlığını göster
end[/codebox]
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...