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

Procedural File: solvemedialib.php

Source Location: /users/classes/solvemedialib.php



Classes:

SolveMediaResponse
A SolveMediaResponse is returned from solvemedia_check_answer()


Page Details:

Copyright (c) 2009 by Jeff Weisberg

Author: Jeff Weisberg Created: 2009-Jun-22 16:44 (EDT) Function: SolveMedia API php code

$Id$

This is a PHP library that handles calling SolveMedia.

  • Documentation and latest version http://www.solvemedia.com/
  • Get a SolveMedia API Keys http://api.solvemedia.com/public/signup




Tags:

filesource:  Source Code for this file







ADCOPY_API_SECURE_SERVER [line 51]

ADCOPY_API_SECURE_SERVER = "https://api-secure.solvemedia.com"

[ Top ]



ADCOPY_API_SERVER [line 50]

ADCOPY_API_SERVER = "http://api.solvemedia.com"
The solvemedia server URL's


[ Top ]



ADCOPY_SIGNUP [line 53]

ADCOPY_SIGNUP = "http://api.solvemedia.com/public/signup"

[ Top ]



ADCOPY_VERIFY_SERVER [line 52]

ADCOPY_VERIFY_SERVER = "verify.solvemedia.com"

[ Top ]




solvemedia_check_answer [line 167]

SolveMediaResponse solvemedia_check_answer( string $privkey, string $remoteip, string $challenge, string $response, [string $hashkey = ''])

Calls an HTTP POST function to verify if the user's guess was correct



Parameters

string   $privkey  
string   $remoteip  
string   $challenge  
string   $response  
string   $hashkey  
[ Top ]



solvemedia_get_html [line 119]

string solvemedia_get_html( string $pubkey, [string $error = null], [boolean $use_ssl = false])

Gets the challenge HTML (javascript and non-javascript version).

This is called from the browser, and the resulting solvemedia HTML widget is embedded within the HTML form it was called from.




Tags:

return:  - The HTML to be embedded in the user's form.


Parameters

string   $pubkey   A public key for solvemedia
string   $error   The error given by solvemedia (optional, default is null)
boolean   $use_ssl   Should the request be made over ssl? (optional, default is false)
[ Top ]



solvemedia_get_signup_url [line 226]

void solvemedia_get_signup_url( [string $domain = null], [string $appname = null])

gets a URL where the user can sign up for solvemedia. If your application has a configuration page where you enter a key, you should provide a link using this function.



Parameters

string   $domain   The domain where the page is hosted
string   $appname   The name of your application
[ Top ]



_adcopy_http_post [line 80]

array _adcopy_http_post( string $host, string $path, array $data, [int $port = 80])

Submits an HTTP POST to a solvemedia server



Tags:

return:  response


Parameters

string   $host  
string   $path  
array   $data  
int   $port   port
[ Top ]



_adcopy_qsencode [line 60]

string _adcopy_qsencode( $data $data)

Encodes the given data into a query string format



Tags:

return:  - encoded request


Parameters

$data   $data   - array of string elements to be encoded
[ Top ]



Documentation generated on Wed, 29 Jul 2015 13:57:28 +0000 by phpDocumentor 1.5.0-lsces