Services_Digg
[ class tree: Services_Digg ] [ index: Services_Digg ] [ all elements ]

Class: Services_Digg_Proxy

Source Location: /Services_Digg-0.4.7/Services/Digg/Proxy.php

Class Overview


Services_Digg_Proxy


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 56]
Services_Digg_Proxy

This allows you to make JSON requests to the Digg API from your own website. Create a PHP script like the one below and then request it in the following manner:

http://www.example.com/myproxy.php?endPoint=/errors

Replace the endPoint argument with any of the valid endpoints outlined in the Digg API documentation. All other arguments are passed onto the API without modification.

  1.  <?php
  2.  
  3.  require_once 'Services/Digg/Proxy.php';
  4.  Services_Digg::$appKey 'http://www.example.com/myproxy.php';
  5.  $proxy = new Services_Digg_Proxy();
  6.  $proxy->proxy();
  7.  
  8.  ?>



[ Top ]


Method Detail

addRequestHeader   [line 195]

void addRequestHeader( string $header)

Add an additional request header

A way to set specific headers to be sent to the API if you wish to overload the request behavior.

  • Access: public

Parameters:

string   $header   — 

[ Top ]

proxy   [line 96]

void proxy( )

Proxy the request

Takes either a GET or POST request and proxies a request to the Digg API via an HTTP_Request.

  • See: HTTP_Request
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:32:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.