How do I get the content of a returned page?

numero = 209
interpreted = N
texte = Is there a simple way to get the results of a call to a web page or do I have to build the http request from scratch using tcpconnect? I just want to call, say, http://www.nytimes.com, and get the contents of the page returned. Seems like it should be simple. --russ

Solution

[text]theresult=[TCPConnect host=[host]][!]  [/!][TCPSend]GET /thepathto/thepage.html?someparam=thevalue HTTP/1.0[UnURL]%0D%0A[/UnURL][!]  [/!]Host: [host][UnURL]%0D%0A%0D%0A[/UnURL][/TCPSend][!]  [/!][/TCPConnect][!][/!][/text]
hint
[middle startafter=&endbefore=][theresult][/middle]
Is there a simple way to get the results of a call to a web page or do I have to build the http request from scratch using tcpconnect?

I just want to call, say, http://www.nytimes.com, and get the contents of the page returned. Seems like it should be simple.

--russ

Solution



[text]theresult=[TCPConnect host=[host]][!]
[/!][tcpsend]GET /thepathto/thepage.html?someparam=thevalue HTTP/1.0[unurl]%0D%0A[/UnURL][!]
[/!]Host: [host][unurl]%0D%0A%0D%0A[/UnURL][/TCPSend][!]
[/!][/TCPConnect][!]
[/!][/text]


hint

[middle startafter=&endbefore=][theresult][/middle]

DOWNLOAD WEBDNA NOW!

Top Articles:

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Download WebDNA Applications

WebDNA applications...

Tips and Tricks

A list of user-submitted tips ...

WebDNA Libraries

A list of available libraries for WebDNA...

WebDNA Modules

A list of the currently available modules...

F.A.Q

A compilation of some user's questions...

Related Readings:

a [shownext] example

How to use [shownext] to create "Next | Previous" search results the same way Google does...

alternative to [shownext]

This will show your next links in the format of Page 1 | 2 | 3 etc and can be used even when the page isn't a results page from a [search] command...

How do I get the content of a returned page?

...

another [shownext] example

How to use [shownext] to create "Next | Previous" search results the same way Google does...

an example of application for [shownext]

How to use [shownext] to create "Next | Previous" search results the same way Google does...

How do I make tcpconnect send a username and password like the browser does?

so I can access a page that normally needs to be logged into via the browser's authentication dialog? In other words...