473,766 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get/set and send the HTTP Headers(user-defined)

[Qtn : How to get/set and send the HTTP Headers(user-defined) coming from
another domain/site]

Hi Experts,

In one SMS gateway project i need a great and urgent help from u all. There,
the Service Providers sending the data thru "HTTP Headers" (For ex.
sms-Id,sms-source [user defined]).
So i need to get and parse the name value pairs, and need to respond/send
the same way as coining the "HTTP Headers" (For ex.
sms-Id,sms-destination,sms-msg [user defined]).

Pls its urgent.

thanx in advance
Laks.R
Jul 22 '05 #1
1 6594
Hi Experts!

The answer is Found!!!

Yes,
1) Using "xmlhttp.setReq uestHeader", we can coin the headers
2) Using Request.ServerV ariables("HTTP_ <header-name>")), we can list the value

thanx and regards
Laks.R

=============== =============== =======
<%
'Header3.asp

url = "http://prism04/asp/header4.asp"
set xmlhttp = CreateObject("M SXML2.ServerXML HTTP")
xmlhttp.open "POST", url, false
xmlhttp.setRequ estHeader "Content-Type",
"applicatio n/x-www-form-urlencoded"
xmlhttp.setRequ estHeader "MyName", "Lakshmi Narayanan.R"
xmlhttp.setRequ estHeader "MyName1", "Lakshmi Narayanan.R"
xmlhttp.send "x=1&y=2"

Response.Write "<br>Status " & xmlhttp.status
Response.write "<br>Conten t " & xmlhttp.respons eText
set xmlhttp = nothing
%>
=============== =============== =======
<%
'Header4.asp

dim fs,fname
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
set fname=fs.Create TextFile("C:\In etpub\wwwroot\a sp\db\test.txt" ,true)
fname.WriteLine (Request.Server Variables("ALL_ RAW"))
'fname.WriteLin e(Request.Form( "x"))
'fname.WriteLin e(Request.Form( "y"))
fname.Close
set fname=nothing
set fs=nothing
Response.Write( "Success")
%>
=============== =============== ======

"Lakshmi Narayanan.R" wrote:
[Qtn : How to get/set and send the HTTP Headers(user-defined) coming from
another domain/site]

Hi Experts,

In one SMS gateway project i need a great and urgent help from u all. There,
the Service Providers sending the data thru "HTTP Headers" (For ex.
sms-Id,sms-source [user defined]).
So i need to get and parse the name value pairs, and need to respond/send
the same way as coining the "HTTP Headers" (For ex.
sms-Id,sms-destination,sms-msg [user defined]).

Pls its urgent.

thanx in advance
Laks.R

Jul 22 '05 #2

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

Similar topics

3
6092
by: fr? | last post by:
Hi, I'm trying to send HTTP GET (or POST) requests to a server. This server accepts these requests only from the IP-address of my server, not of my client pc. So, some data generated on the server needs to be send to another server. http://remoteserver.com/path/to/file?text=text +to+be+send+as+sms+message How would one do this???
1
5477
by: Aliandro | last post by:
Hi I am really stuck and need some expertise help please. I have an XML file: <XML> <USER_INFO> <USERNAME>username</USERNAME> <PASSWORD>password%</PASSWORD> </USER_INFO> <SITE_INFO> <SITE_NO>18856</SITE_NO> </SITE_INFO>
1
2713
by: searcher1234 | last post by:
I have wrote a web server by C language. but I don't know how to send back error page to web browser if user type wrong web address or name that will show HTTP/1.0 404 NOT FOUND. One more is how I can stop server socket sending rubbish code if the requested files are sent competely. Thanks
2
8871
by: inferno2000 | last post by:
Let's say if I want to send a http "Post" request to a url, and check the http status code later. How should I write the code? I have found example to use WinHttp to send "Get" request and check the http status code: ====== Set objWinHttp = CreateObject("WinHttp.WinHttpRequest.5") objWinHttp.Open "GET", strURL objWinHttp.Send If objWinHttp.Status <> 200 Then
11
22630
by: afrinspray | last post by:
I get this error everytime I finish an AJAX post with http.send(null): Error: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: :: getReplyWindow :: line 62" data: no] Is it necessary to follow up the final http.send with http.send(null)? Thanks, Mike
6
2833
by: gaurierram | last post by:
Hii, I want to send data from a pocket pc to a desktop. It is to be done by sending a http request.Can I get the code for that? Pocket pc has C#.net 1.0 and desktop has c#.net2.0. What other directories are to be included work out the code?
1
2548
ashsa
by: ashsa | last post by:
Hi, Could someone please illustrate how to send and receive HTTP requests programmatically through any HTTP proxy. Say if I have the ip address and the port number of a proxy(201.30.47.218:3128) and I want to programmatically hit a site(www.google.com) through the proxy, what should be the URL my program use to hit google through this proxy? I came across this javascript based adobe AIR application "Market Samurai" that accepts from the...
0
1312
by: Atul Goyal | last post by:
Hello I want to send Http request by using swing . Can you help me fot that. ?
0
9404
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,...
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10008
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
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
9837
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
8833
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...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
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
3532
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.