473,770 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to grab content from another site

Hi!

I'm stuck on a little problem...

I want to get te article heading-text and teaser from
http://www.avisa-valdres.no and display it on another page using asp code...

An example on this: www.valdres.no is picking news from www.avisa-valdres.no
and displaying it on valdres.no...

How can I do this with ASP/VBScript code??
Any idea?

The code on valdres.no wich pics the content is made in iHTML, so that does
not help me much ;)

regards
Christopher Brandsdal
Norway
Jul 19 '05 #1
5 3264
http://aspfaq.com/show.asp?id=2173

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Christophe r Brandsdal" <br*******@bina er.no> wrote in message
news:u2******** ******@TK2MSFTN GP12.phx.gbl...
Hi!

I'm stuck on a little problem...

I want to get te article heading-text and teaser from
http://www.avisa-valdres.no and display it on another page using asp code...
An example on this: www.valdres.no is picking news from www.avisa-valdres.no and displaying it on valdres.no...

How can I do this with ASP/VBScript code??
Any idea?

The code on valdres.no wich pics the content is made in iHTML, so that does not help me much ;)

regards
Christopher Brandsdal
Norway

Jul 19 '05 #2
Thanks!

But there is only one more problem...
When I grab a site containing the norwegian characters æøå, it does not
understand the characters. Is there any way I can get it to understand æøå?
"Steven Burn" <pv*@noyb.com > wrote in message
news:uv******** ******@tk2msftn gp13.phx.gbl...
http://aspfaq.com/show.asp?id=2173

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Christophe r Brandsdal" <br*******@bina er.no> wrote in message
news:u2******** ******@TK2MSFTN GP12.phx.gbl...
Hi!

I'm stuck on a little problem...

I want to get te article heading-text and teaser from
http://www.avisa-valdres.no and display it on another page using asp

code...

An example on this: www.valdres.no is picking news from

www.avisa-valdres.no
and displaying it on valdres.no...

How can I do this with ASP/VBScript code??
Any idea?

The code on valdres.no wich pics the content is made in iHTML, so that

does
not help me much ;)

regards
Christopher Brandsdal
Norway


Jul 19 '05 #3
Christopher Brandsdal wrote on 13 jul 2004 in
microsoft.publi c.inetserver.as p.general:
When I grab a site containing the norwegian characters æøå, it does
not understand the characters. Is there any way I can get it to
understand æøå?


I do not understand "understand ", since a programme is not understanding
anything.

Perhaps:

s = "æø"

s = replace(s,"æ"," ae")
s = replace(s,"ø","[slashed o]") ' or whatever

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #4
http://forums.devarticles.com/archive/t-3992

see this link to understand what I mean....

"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29...
Christopher Brandsdal wrote on 13 jul 2004 in
microsoft.publi c.inetserver.as p.general:
When I grab a site containing the norwegian characters æøå, it does
not understand the characters. Is there any way I can get it to
understand æøå?


I do not understand "understand ", since a programme is not understanding
anything.

Perhaps:

s = "æø"

s = replace(s,"æ"," ae")
s = replace(s,"ø","[slashed o]") ' or whatever

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 19 '05 #5
found the solution myself :)

<%
'function for reading "non-english" charachters
Function BinToText(varBi nData, intDataSizeInBy tes)
Dim objRS
Const adFldLong = &H00000080
Const adVarChar = 200
Set objRS = Server.CreateOb ject("ADODB.Rec ordset")
objRS.Fields.Ap pend "txt", adVarChar, intDataSizeInBy tes, adFldLong
objRS.Open
objRS.AddNew
objRS.Fields("t xt").AppendChun k varBinData
BinToText = objRS("txt").Va lue
objRS.Close
Set objRS = Nothing
End Function

Function GetHTML(strURL, strStart,strEnd )
Dim objXMLHTTP, strReturn, strHTML
Set objXMLHTTP = Server.CreateOb ject("Msxml2.Se rverXMLHTTP")
objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.SetR equestHeader "content-type","text/html;charset=IS O-8859-1"
objXMLHTTP.Send
strHTML = BinToText(objXM LHTTP.responseB ody, 4800)
Set objXMLHTTP = Nothing

Dim st,en
st=Instr(strHTM L,strStart)
If st<>0 Then
st=st+Len(strSt art)
en=Instr(st,str HTML,strEnd)
strReturn=Mid(s trHTML, st, en-st)
Else
strReturn="Inge n driftsmeldinger tilgjengelig."
End If
GetHTML = strReturn
End Function

'************** ***----- MY CONFIG SECTION START -----*************** **
dim URLsnatch, HTMLsBlock, HTMLeBlock
'Webpage to scrape
URLsnatch = "http://www.avisa-valdres.no/default.asp"
'Where to start scraping the webpage
HTMLsBlock = "<! Hovedkolonne ->"
'Where to end scraping the webpage
HTMLeBlock = "<! Vertikal skille 2 ->"
'************** ****----- MY CONFIG SECTION END -----*************** ***
'Write it:
Dim grabbedText
grabbedText = GetHTML(URLsnat ch,HTMLsBlock,H TMLeBlock)
%>

<%=grabbedtext% >
"Christophe r Brandsdal" <br*******@bina er.no> wrote in message
news:#B******** ******@TK2MSFTN GP11.phx.gbl...
http://forums.devarticles.com/archive/t-3992

see this link to understand what I mean....

"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29...
Christopher Brandsdal wrote on 13 jul 2004 in
microsoft.publi c.inetserver.as p.general:
When I grab a site containing the norwegian characters æøå, it does
not understand the characters. Is there any way I can get it to
understand æøå?


I do not understand "understand ", since a programme is not understanding
anything.

Perhaps:

s = "æø"

s = replace(s,"æ"," ae")
s = replace(s,"ø","[slashed o]") ' or whatever

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2718
by: Baby Blue | last post by:
I have 2 code like below to grab a news website for my site. However, when I click some links (such as : http://wwww.vnexpress.net/xxx/xxxx ) inside the site which I want to grab, it has some errors. Can any body help me ?? Demo : news.thuthao.info The real website : vnexpress.net ---------------------------index.php------------------------------- <?php
3
2911
by: Baby Blue | last post by:
I have 2 codes below to grap data from another site. I use them to get the data from one News site. However, when I click on some link inside (such as : http://www.thuthao.info/news/chitiet.php?url=http://vnexpress.net/Vietnam/Kinh-doanh/2005/01/3B9DB0AC/ ), there are some errors, I try fix some, but hopeless. CAN ANY BODY HELP ME ??? MUCH APPRECIATED demo : news.thuthao.info real site : www.vnexpress.net Code of Index.php
12
3229
by: jonathan.beckett | last post by:
Hi All, For the past few months I have been working on an open source Apache/PHP/MySQL content management system - and have recently made it available for download. It's still very much a work in progress (current release version is 0.4.6), but you should get a very good idea of what it's about by visiting the site (which uses it, funnily enough), or downloading a copy of it and trying it out.
0
2326
by: jonathan.beckett | last post by:
Hi All, I have just made version 0.4.8 of the PluggedOut CMS Content Management System available for download - it's free, and covered by the GPL. It's still very much a work in progress (current release version is 0.4.8), but you should get a very good idea of what it's about by visiting the site (which uses it, funnily enough), or downloading a copy of it and trying it out.
3
1371
by: Andy Kasotia | last post by:
On the client once the user clicks the Submit button....in my code the following javascript function kicks off... onclick="return SubmitForm('frmCurrBuildings', 'CurrBuildings.asp', c_iLOADNEW, '_self')" function SubmitForm( FormName, ActionASP, ActionVal, TargetVal ) eval( "document." + FormName + ".target = '" + TargetVal + "'" ) ; eval( "document." + FormName + ".action = '" + ActionASP + "?Action=" + ActionVal + "'" ) ; eval(...
3
4561
by: James | last post by:
Hi guys, I have been building a search engine here - not because I have plans of dethrowning Google but as a simple app upon which to develop a function set that I can use for other things. So I coded my little search engine, uploaded it and it didn't work with my host (Dreamhost.com): Warning: fopen(): URL file-access is disabled in the server
7
370
by: Water Cooler v2 | last post by:
I know what it is, and yet the knowledge of what a CMS is, is so vague that I find myself asking this question every now and then. I've googled and read the resources too. However, the knowledge is still not clear. It is so vague. Me: Just what is a content management system? Myself: A place where content can be stored.
0
960
by: Grey | last post by:
i need to grab the pdf content. the pdf content has the standard format with data inside. is there any way to 1) grab the table content in pdf format; and then 2) put the data into excel
1
4038
by: helraizer1 | last post by:
Hi folks and folksesses, In the GD2 library there is a function called 'imagegrabscreen()' and 'imagegrabwindow()', which captures a screen dump of the current window, or another one specified by the code. The only problem is that it launches the function as soon as the page is loaded, which means the target page, which is being grabbed hasn't actually loaded at the time of the screen grab. So all you are left with is an image of a blank...
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.