Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Getting URL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting URL

 Post Reply Post Reply Page  <12
Author
Dazz View Drop Down
Newbie
Newbie
Avatar

Joined: 24 January 2003
Location: United Kingdom
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dazz Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 3:43pm

How do i set a location for the images eg fix http://www.server.co.uk/folder on the front of each image location ?

Again your help is greatly appreciated

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 3:46pm
can you tell me what the "real" URL is so i can see the format of the image tag(s)?

then i can tweak the above regular expression to match
Contribute to the working anarchy we fondly call the Internet
Back to Top
Dazz View Drop Down
Newbie
Newbie
Avatar

Joined: 24 January 2003
Location: United Kingdom
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dazz Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 4:07pm
The information that im wanting to extract is on this page
http://www.jenric.freeserve.co.uk/links.htm
I want to either get the whole page and display the images or get all the links on the page and also display the image links.
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 4:34pm
this will at least get you started, i dont have the time or desire to write the whole thing for you, but you should be able to take the following and tweak it to your needs..... if you need RegEx help, ASPFaqs is an excellent resource....


<%@ Language=VBScript %>
<% Response.Expires = -1 %>
<% Response.Buffer = True %>
<%
PageDomain = "http://www.jenric.freeserve.co.uk/"
PageLocation = PageDomain & "links.htm"

Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
xml.Open "GET", PageLocation, False
xml.Send
strHTML = xml.ResponseText
Set xml = Nothing
Dim objRegExp, objMatch, objMatches
Set objRegExp = New RegExp

objRegExp.IgnoreCase = True
objRegExp.Global = True
%>
<html>
<body style="font-size: 10px; font-family: verdana;">
All Retrieved Images/Links/Both from <a href="<%= PageLocation %>" target="_blank"><b><%= PageLocation %></b></a><hr />
<br />
<font style="color: blue;">Just Images:</font><br />
<%
objRegExp.Pattern = "<img border=""0"" src=""graphics_new/(.*?)>"
Set objMatches = objRegExp.Execute(strHTML)
For Each objMatch in objMatches
     Response.Write( Replace(objMatch,"src=""grap", " align=""left"" src=""" & PageDomain & "grap") )
     Response.Write(Server.HTMLEncode(objMatch) & "<br clear=""all""/>")
Next
%>
<br /><hr />
<font style="color: blue;">All Links:</font><br />
<%
objRegExp.Pattern = "<a (.*?)</a>"
Set objMatches = objRegExp.Execute(strHTML)
For Each objMatch in objMatches
     Response.Write( Server.HTMLEncode(objMatch) & "<br clear=""all""/>")
Next
%>
<%
Set objMatch = Nothing
Set objRegExp = Nothing
%>
</body>
</html>
Contribute to the working anarchy we fondly call the Internet
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.