Hey Guys. this is my first post in this forum.
I was trying to send a custom header to another page for accessing its api.
I am using this HttpResponse::setHeader ( 'customname', 'myvalue' );
What class do I need to use for this? Does PHP5.1 and above have this inbuilt or do I need to include some particular class to use this? How do I create and instance of this class? Any help is appreciated.
sending custom headers with HttpResponse
Moderator: General Moderators
Re: sending custom headers with HttpResponse
23 views and no reply.*Disappointed*. Does no one use such a feature?
Re: sending custom headers with HttpResponse
try to use
<?php
header("location: index.php");
exit();
?>
if u are not satisfied then mail me.
i'll send u the source code to post values to different pages
without opening the pages using socket.
<?php
header("location: index.php");
exit();
?>
if u are not satisfied then mail me.
i'll send u the source code to post values to different pages
without opening the pages using socket.
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: sending custom headers with HttpResponse
You would get more help if you outlined a little more about what you are trying to do. I would assume that you would want HttpRequest to actually request something and then HttpResponse respond.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: sending custom headers with HttpResponse
I have a simple need. I need to send some information in http headers using php. I need to access a api and I have an api key the api key needs to be sent in the header.
Location is for redirecting and not for sending custom headers. I found this method on one tutorial - HttpResponse::setHeader ( 'customname', 'myvalue' ); but it wont work as the class definition is not there. Hence the php errror.
Location is for redirecting and not for sending custom headers. I found this method on one tutorial - HttpResponse::setHeader ( 'customname', 'myvalue' ); but it wont work as the class definition is not there. Hence the php errror.
Re: sending custom headers with HttpResponse
You could look into sockets and send them that way?
http://us2.php.net/manual/en/function.fsockopen.php
http://us2.php.net/manual/en/function.fsockopen.php