header

Prevent sent emails treated as junk mails using php mail funtion

I wrote a PHP script to send emails. My script is like this: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: [email protected]' . "\r\n"; // Email Variables $toUser = "[email protected]"; // recipient $subject = "testing"; // subject $body = "<html><body>...

What is the best Rails caching option for largely static pages with a dynamic header

I have a set of largely static pages which I'd be happy to page cache for relatively long periods apart from the fact that their layout includes a much more dynamic header. The most promising idea so far seems to be using action caching without layout :- class SomethingController < ApplicationController caches_action :index, :layout...

How to align TexBlocks in WPF Expander Header

Hi, I have Multiple Texblock in Expander Header. I want these TextBlocks aligned to Left, Right and Center. How can i achieve this? Please Help... Thanks Sharath The Text in Red should be left aligned, the one in blue should be center aligned and the green should be right aligned Please copy the code in XAMLPad.Exe ...

PHP / Curl: HEAD Request takes a long time on some sites

I have simple code that does a head request for a URL and then prints the response headers. I've noticed that on some sites, this can take a long time to complete. For example, requesting http://www.arstechnica.com takes about two minutes. I've tried the same request using another web site that does the same basic task, and it comes bac...

PHP and HTTP Header Line Breaks: What character used to represent?

I'm looping through each line of a series of CURL returned http headers, trying to detect when one ends and the next begins. I know that an http header terminates with an empty line, but what character is used to represent this line break in php? I've tried with \n but it doesn't seem to work. I certainly could be doing something wrong. ...

SOAP Header with identity of final client

The environment is in-house service based applications running in a Windows environment with WCF. There are several "middle-tier" ASP.NET Web Applications and Web Services that authenticate the final client using Windows authentication, and use ASP.NET Roles to set Thread.CurrentPrincipal to a suitable RolePrincipal. These application...

Cost of Including Header Files in Objective-C

This may seem like a really stupid question, but what is the cost of including (actually, calling #import) a header file in Objective-C? I get tired of constantly including the same headers in various locations, so I decided to simply create a GlobalReferences.h file that includes several commonly-referenced headers. Is there any apprec...

C++ Header file that declares a class and methods but not members?

Is it possible to make a C++ header file (.h) that declares a class, and its public methods, but does not define the private members in that class? I found a few pages that say you should declare the class and all its members in the header file, then define the methods separately in you cpp file. I ask because I want to have a class th...

Unescape Python Strings From HTTP

I've got a string from an HTTP header, but it's been escaped.. what function can I use to unescape it? myemail%40gmail.com -> [email protected] Would urllib.unquote() be the way to go? ...

Reporting services 2005: Is there a way to dymanically change a report header?

I have a report that needs different header text on pages depending on the content of the page. Is there a way change the text in the header based on a piece of information on a page? Page 1 header: ITINERARY Page 2 header: ITINERARY Page 3 header: FARE RULES Page 4 header: RECEIPT The other issue is that eac...

PHP header redirect not working when posting a form - using output buffer - but does in other cases?!

Hi, I have an unusual problem, only happening on one server. Following code .... elseif ($_GET['action']=='login') { if (empty($_POST['login_name'])) { $_POST['login_name']=''; } if (empty($_POST['login_pass'])) { $_POST['login_pass']=''; } if (!empty($_POST['send'])) { if (($_POST['login_name']==_ADMIN_NAME) and ($_POST['logi...

When to send HTTP status code?

Currently in my PHP scripts, I redirect the user to a custom 404 not found error page when he/she tries to access content that doesn't exist or doesn't belong to that user. Like so: header('Location: http://www.mydomain.com/error/notfound/'); exit; I realize the above header() call sends a 302 redirect status code by default. What I ...

How to determine the Content-Length of a gzipped file?

Right now I'm trying to serve CSS and JS files from a server that won't let me enable mod_gzip or mod_deflate. So I wrote a small PHP script to compress with GZIP and return to the user. Example Code: $filename = "style.css"; if (!file_exists($filename) || !($info = stat($filename))) { header("HTTP/1.1 404 Not Found"); die(); } ...

Find header file that defines a C function

Shouldn't be hard, right? Right? I am currently trawling the OpenAFS codebase to find the header definition of pioctl. I've thrown everything I've got at it: checked ctags, grepped the source code for pioctl, etc. The closest I've got to a lead is the fact that there's a file pioctl_nt.h that contains the definition, except it's not act...

PHP generate file for download then redirect

I have a PHP app that creates a CSV file which is forced to download using headers. Here's the relevant part of the code: header('Content-Type: application/csv'); header("Content-length: " . filesize($NewFile)); header('Content-Disposition: attachment; filename="' . $FileName . '"'); echo $content; exit(); What I'd like to do is r...

What to include in email headers, using php mail()?

Hi, When I want to send email, my codes look like these: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: me@localhost' . "\r\n"; // Email Variables $toUser = 'you@something'; $subject = "Testing"; $body = '<html><head><title></title></head><body> ...

How do I add a SOAP Header using Java JAX-WS

A typical SOAP client request using JAX-WS might be FooService service = new FooService(); FooPort port = service.getFooPort(); FooPayload payload = new FooPayload(); payload.setHatSize(3); payload.setAlias("The Hat"); ... port.processRequest(payload); This generates an HTTP request content something like <?xml ... ?> <S:Envelope xml...

Display a .swf file as ASP .Net Page header

I have an ASP. Net 2.0 website with C# 2005 as the programming language. I am using CSS for the layout. Currently I am using a plain/static .Gif image as my header. I would like to enhance the look by using some animation in the header. I used some flash utilities to design my required animated banner. But since I was unable to use the ....

valid html header

Is there any way to write a valid header/link/image? Something like <a href="index.html"><h1 id="logo">Company name</h1></a> (with an image set as background and the text moved way to the left so its not visible via css) ...

First Column of a Grid is the headers?

Is there a way (using jquery, yui or some other js library) to display a grid that has the headers in the first column? That is, I would have something like: Name Geoffrey EMail GMan67@.. Username GJFM Instead of: Name EMail Username Geoffrey GMan67@.. GJFM G-Man ...