header

New line before header()

I'm working with a custom made Joomla script that generates an image from a blob in a database. However, when we moved it from an Apache server to an IIS server, the script is breaking. Upon investigation, it seems that now, there is a line break that is getting appended before the header function is being run (when I comment out the i...

Custom HTTP Request headers in HTML

Does anyone know if its possible to send out custom http REQUEST headers in HTML without having to use javascript (no xhr wrapper). Would it be possible to define them as meta tags within the head? Or may they be defined in the form somewhere? <meta http-equip="x-something-custom" name="custom value" /> this works, however, this is a...

What could be adding "Pragma:no-cache" to my response Headers? (Apache, PHP)

I have a website whose maintenance I've inherited, which is a big hairy mess. One of the things i'm doing is improving performance. Among other things, I'm adding Expires headers to images. Now, there are some images that are served through a PHP file, and I notice that they do have the Expires header, but they also get loaded every tim...

Flex datagrid headerColor style is not working....

Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoRes...

Created C header file, getting errors..

Hi, I'v created a C header file (It's compiled), now when i compile my program it comes up with tons of errors like: warning: null character(s) ignored error: stray ‘\23’ in program TheFunctions.h:1722: error: stray ‘\200’ in program Inside the header file is simply two functions, which work in the normal c program. Please help! ...

MATLAB how to write header in text file

How to write a text header in text file? for example in the example below, how to write the header code salay month just once? Code Salary Month 12 1000 12 14 1020 11 11 1212 9 fid = fopen('analysis1.txt','wt'); for i=1:10 array = []; % empty the array .... array = [code salary month]; format short g; fprin...

How do I log the raw HTTP headers with a PHP script?

I'm using a cURL script to send POST data through a proxy to a script and I want to see what raw HTTP headers the cURL script is sending. List of things I've tried: echo curl_getinfo($ch, CURLINFO_HEADER_OUT) gives no output. file_get_contents('php://input') gets some HTTP headers but not all. print_r($_SERVER) also gets some HTTP head...

Should we use require_once instead header location?

Hello commnunity, i have somthing like this: (if this page needs the user to be logged) if(!isset($_SESSION['usr_id'])){ //if not a logged user $_SESSION['redir']=curPageURL();//Saving the current page for the redirection header('Location: ../Session/loginFrm.php'); } and in loginFrm.php, we do: {...after validation...

php header location attribute not working

I have a header location problem despite following all the advice I can find online. The mailer script sends the email(s) but I get a 'headers already sent' error relating to Line 29 which is {header("Location: $thanksURL");} and no redirect to the confirmation page. If I replace the header location code with an instruction to print a co...

Howto change Axis server-config.wsdd sothat we don't expect a SOAPAction

The problem I'm facing is that the client of my service will never send me a SOAPAction header. How can I tell Axis to still map to the incomming call to my service implementation anyway. I did bump into tricks like adding a Handler like this: <handler name="ReportMapper" type="java:com.mycompany.project.ReportMapper"/> <transport nam...

Help with header() php

Hello I want to refresh a script from the server when back button is pressed. For that, i'm using this code: header( "Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" ); header( "Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT" ); header( "Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1 header( "Cache...

Set Headers with jQuery.ajax and JSONP?

I am trying to access google docs with jQuery. Here's what I have so far: var token = "my-auth-token"; $.ajax({ url: "http://docs.google.com/feeds/documents/private/full?max-results=1&amp;alt=json", dataType: 'jsonp', beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", "GoogleLogin auth=" + token); }, succes...

Clone request headers in Vanilla Perl CGI to LWP UserAgent

I have a perl CGI application that I want to take the users request headers, and turn those around into an LWP::UserAgent get request. Basically the goal is to replicate the incoming users headers and use those to make a separate request. I've tried to create the headers myself but when I attempt to display the CGI headers and then my ...

PHP mail: use quotes in $to and in from mail header or NOT?

Do we need to use quotes in $to and in from/cc/bcc mail headers when using PHP mail function? I mean, let's say I want to send mail to: User One <[email protected]> Do I have to call: mail("\"User One\" <[email protected]>", ... OR mail("User One <[email protected]>", ... I suppoose once you give me an answer for the $to, it is going...

Problem with header in php

Consider the following code <?php $username = "root"; $password = ""; $host = "localhost"; $database = "binaries"; @mysql_connect($host, $username, $password) or die("Can not connect to database: ".mysql_error()); @mysql_select_db($database) or die("Can not select the database: ".mysql_error()); $id = 5; if(!isset($id) || e...

Editing Email Headers

Halo out there! I was reading an article before that learns you how to expose an email sender.. So this article describes the way that someone can change the email headers (Received) and send you a fake email. E.g He change one received header and makes you believe that this mail comes from halo.com and not from hotmail.com . My quest...

Headers already sent error in CakePHP app

function new_photo() { if( !empty($this->data)) { $this->data['Photo']['showcase_id'] = $this->Session->read('CurrShowcase.id'); $this->data['Photo']['added'] = date("Y-m-d H:i:s"); $this->Showcase->Photo->save...

php header, internal server error

hi I coded the code bellow my self, and I get a f*ing internal server error every time, I'm getting sick and tired of this, please help: <? function doer($str) { $d = base64_decode($str); $a = explode('<||>',$d); $v =array( 'path' => $a[0], 'size' => $a[1], 'type' =>$a[2] ...

keeping private parts outside c++ headers: pure virtual base class vs pimpl

Hi all, I recently switched back from Java and Ruby to C++, and much to my surprise I have to recompile files that use the public interface when I change the method signature of a private method, because also the private parts are in the .h file. I quickly came up with a solution that is, I guess, typical for a Java programmer: interfa...

Make an <img> tag extend past the <body> tag in css

Hi all. I'm trying to develop a header area which expands past the usual 960px wide container, without using a background image, my reason for this is because an <img> tag would work better in my case. My problem is, if i place my image in the container, such as this code example: <style> #container { width: 960px; ma...