Server-Side Scripting
The Pageflakes framework generates the following HTTP headers when fetching a Flake. Flakes that utilize server-side scripting can use these headers as needed.
| Accept | Type of content Pageflakes expects from your script. If the received Content-Type does not match this field, then the content is discarded. |
| Accept-Encoding | Currently only supports gzip encoding. |
| Accept-Language | Original Accept-Language header that was reported to Pageflakes by the requesting user agent. This header can be used to determine the browser’s language. |
| Host | IP address of the Pageflakes server. This is within the IP range: 69.5.89.XXX. Flakes should verify this IP address to ensure that the data that is passed in the UserGUID parameter can be trusted.
If the IP address does not match, this means that the flake is being accessed by a non-Pageflakes server, and the flake is then responsible for authenticating the request and not releasing any sensitive data until the access level of the requester has been ascertained. |
| User-Agent | Agent string identifying the Pageflakes agent making the request. |
| UserAgent | User-Agent header that was reported to Pageflakes by the requesting user agent. |
| InstanceId | Unique ID of the flake instance. |
| FlakeUrl | URL of the flake with query string. This is the URL of the flake instance that was used to add the flake.
For example, a single URL may implement two flakes: A more likely example might have the News flake and the Weather flake share some code: This parameter can be used by the flake to determine any specific behavior. |
| HostIP | IP address reported to Pageflakes by the requesting Browser. |
| UserGUID | Internal GUID of the Pageflakes user. This can be used in combination with the InstanceId to maintain session state. |
Example:
Accept: text/html, text/xml, text/plain, application/json, ...
Accept-Encoding: gzip
Accept-Language: en-us
Host: 69.5.89.XXX:1167
User-Agent: Pageflakes/1.0 (WinNT 5.1.2600.0; http://www.pageflakes.com)
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1;
InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; FDM)
InstanceId: m90629
FlakeUrl: http://www.example.com/yourapp/yourflake.php
HostIP: 127.0.0.1
UserGUID: 983b4547-78ae-423e-aae9-13aa47c5d657

