473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

http connection

Hi all!


i hav a text file on server which contain ip address, reading this address i have to make a http connection how can i do this? plz help me im new in this kind of programming..


thanx in advance.
Apr 3 '08 #1
2 1484
jeffstl
432 Expert 256MB
Hi all!


i hav a text file on server which contain ip address, reading this address i have to make a http connection how can i do this? plz help me im new in this kind of programming..


thanx in advance.
If the text files only line and first line in the file is the http address you need then this should be all you need on a web page to direct them to that address. Assuming the file is going to be stored on the root of the web server directory

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <%
  4. Set fs=Server.CreateObject("Scripting.FileSystemObject")
  5.  
  6. Set f=fs.OpenTextFile(Server.MapPath("myfile.txt"), 1)
  7. Response.redirect(f.ReadAll)
  8. f.Close
  9.  
  10. Set f=Nothing
  11. Set fs=Nothing
  12. %>
  13. </body>
  14. </html>
  15.  
  16.  
Apr 4 '08 #2
jeffstl
432 Expert 256MB
Actually, if you want to test whats being returned you can just do this by the way:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <%
  4. Set fs=Server.CreateObject("Scripting.FileSystemObject")
  5.  
  6. Set f=fs.OpenTextFile(Server.MapPath("myfile.txt"), 1)
  7. Response.write(f.ReadAll)
  8. 'Response.redirect(f.ReadAll)
  9. f.Close
  10.  
  11. Set f=Nothing
  12. Set fs=Nothing
  13. %>
  14. </body>
  15. </html>
  16.  
  17.  
Apr 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
4
by: Roger Binns | last post by:
I have just spent several weeks mashing xmlrpc, httplib and SSL (from M2Crypto) to work together. The current standard library has several problems: - Builtin SSL is pretty much useless if you...
3
by: noviceUser | last post by:
can some one guide me how to use HTTP 1.1 pipelining in Python. Client will generate 3 get requests continuously as shown below and then read the response for each GET request. Algorithm...
1
by: Newbie | last post by:
I have set up an ASP script (with some help from microsoft.public.inetserver.asp.general!) that grabs the windows username of the user and puts it into an Access database. It is setup on IIS5 as a...
3
by: Aaron | last post by:
I'm trying to learn how the HTTP protocol works. When aserver has many clients accessing it at the same time. Say 200 people. How does it maintain connection with 200 different concurrent client...
6
by: David Rasmussen | last post by:
I use urllib2 to do some simple HTTP communication with a web server. In one "session", I do maybe 10-15 requests. It seems that urllib2 opens op a connection every time I do a request. Can I...
0
by: Dan Lenski | last post by:
Hi all, I've recently written an HTTP proxy server for the Motorola E815 cell phone, based on Suzuki Hisao's "Tiny HTTP Proxy" (http:// www.okisoft.co.jp/esc/python/proxy/). This cell phone...
1
by: eagerlearner | last post by:
I am using winsock to build a HTTP 1.1 compliant client, when I made the request with the header GET / HTTP/1.1 Host : www.google.com After this header is send using function send(), and when I...
1
by: JohnH | last post by:
Hi, In my application which has two or more threads calling web service or just HttpWebRequest I am seeing some HTTP 400 errors retrun in the response. All the calls are going through the same ISA...
7
by: Guy Davidson | last post by:
Hi Folks, I'm having some issues with an small socket based server I'm writing, and I was hoping I could get some help. My code (attached below) us supposed to read an HTTP Post message...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.