Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 2nd, 2005, 06:34 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can this be done in ASP?

Hi everyone

Am currently working through a website built in ASP

This is what i want to do.

As i am able to send a page request to a server which returns a page to be viewed, i want to take that page it returns(download it), open it internally, set it to a variable, then use a replace command to remove the header and footer of the url and then use the main body as display on the website. Thus just using the body text on my websites branding

Therefore i want to

Request page (Done)
open source (URL)
set as text variable
replace known code (header and footer)
display as body text


Am not to familiar with ASP

Can any1 help

and can it be done!

Nice and easy in php but server doesnt support it, it only does ASP

Reply With Quote
  #2 (permalink)  
Old February 2nd, 2005, 06:54 AM
Authorized User
 
Join Date: Jan 2005
Location: Delhi, Delhi, India.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

U have to made ActiveX DLL for that,
as u made HTTP request with the help of Winsoket,
which return the html code of requested page, u can use this html code according to ur requirement.

U have to explore a bit the http request thru win soket.

Hope this will help u.

Amit Jain
Sr. Software Engineer
Reply With Quote
  #3 (permalink)  
Old February 2nd, 2005, 07:11 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok

am looking into that think that may help!

Just so i get this straight and to make sure where on the same page

am not using Winsoket

All that i mean my url request is that i want to download a certain url defined by the telephone number!

example

http://www.adslchecker.bt.com/pls/adsl/ADSLChecker.TelephoneNumberOutput?URL=www.onyx.net %2Fbroadband.asp&SP_NAME=a%2520Onyx%2520Internet&T elNo=01915292248&VERSION=7&MS=S&CAP=Y&AEA=Y

the red text is the only part that ever changes

which i can code for!

so you input number -> new page downloads url(html) using added tel

does this shine different light?

Cheers for the speedy reply

Phil



Reply With Quote
  #4 (permalink)  
Old February 2nd, 2005, 07:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

This is a crosspost - check my reply here: http://p2p.wrox.com/topic.asp?TOPIC_ID=25956

Reply With Quote
  #5 (permalink)  
Old February 2nd, 2005, 07:48 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

You may use XML HTTP object for this. This is built in windows 2000. If it is not there, you can download and install latest XML parser from MS and run on server.

Here are some sample scripts using this component.

On error resume next
Dim obj_xml_http
Dim str_html
Set obj_xml_http = Server.CreateObject("Msxml2.SERVERXMLHTTP")
obj_xml_http.Open "POST", "http://www.yoursite.com",False
obj_xml_http.Send
If Err.Number <> 0 Then
    Response.Write("Your web site does not appear to be up right now. Please try again later.")
    Err.Clear
Else
    str_html = obj_xml_http.ResponseText
    ' do whatever replacements you want
    Response.Write str_html
End if
Reply With Quote
  #6 (permalink)  
Old February 3rd, 2005, 04:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen N, , Denmark.
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

yep, the XML HTTP way is how to go about it. Just one thing I like to add, that scheme of yours doesn't look legal.

 - mega
Moving to C# .NET
Reply With Quote
  #7 (permalink)  
Old February 3rd, 2005, 04:51 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:) Checky

Yes it is completely legal

We are a valid reseller!

this is what they reccomend doing

but cudnt advice how in asp

How would i encorparate xml http into the site

??

cheers guys

u have showen me the way

:P

Reply With Quote
  #8 (permalink)  
Old February 3rd, 2005, 06:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen N, , Denmark.
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

Just like madhukp suggest (made some small changes):
Code:
dblTelNo = 01915292248
On error resume next
Dim obj_xml_http
Dim str_html, strURL
strURL = "http://www.adslchecker.bt.com/pls/adsl/ADSLChecker.TelephoneNumberOutput" _
         "?URL=www.onyx.net%2Fbroadband.asp&SP_NAME=a%2520Onyx%2520Internet&" _
         "TelNo=" & dblTelNo & "&VERSION=7&MS=S&CAP=Y&AEA=Y"
Set obj_xml_http = Server.CreateObject("Msxml2.SERVERXMLHTTP")
obj_xml_http.Open "POST", strURL, False
obj_xml_http.Send
If Err.Number <> 0 Then
    Response.Write("Your web site does not appear to be up right now. Please try again later.")
    Err.Clear
Else
    str_html = obj_xml_http.ResponseText
    ' do whatever replacements you want
    Response.Write str_html
End if
 - mega
Moving to C# .NET
Reply With Quote
  #9 (permalink)  
Old February 3rd, 2005, 06:09 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can it be done so a telno is passed to the xml
from the page calling the xml

therefore the telno u mentioned will change per exicution

cheers for help all



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
send parameters from asp page to an asp.net form hastikeyvan ASP.NET 1.0 and 1.1 Basics 2 March 29th, 2008 01:32 AM
using asp.net web user control in asp 3.0 App i_shahid Classic ASP Professional 0 January 8th, 2008 07:32 AM
Custom HTTP 404 Problem w/ASP to ASP.NET kwilliams ASP.NET 2.0 Professional 7 November 26th, 2007 04:17 PM
Upgrading ASP w/ SQLserver 2000 to ASP.NET w/2005 cJeffreywang ASP.NET 2.0 Basics 1 April 5th, 2007 11:30 PM
Porting a sa,ple ASP CR viewer app to ASP.NET jhansen42 Crystal Reports 0 August 29th, 2003 10:26 AM



All times are GMT -4. The time now is 10:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.