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:
ADCOPY_API_SECURE_SERVER [line 51]
ADCOPY_API_SERVER [line 50]
ADCOPY_SIGNUP [line 53]
ADCOPY_VERIFY_SERVER [line 52]
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 |
|
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:
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) |
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 |
_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:
Parameters
string |
$host |
|
string |
$path |
|
array |
$data |
|
int |
$port |
port |
_adcopy_qsencode [line 60]
string _adcopy_qsencode(
$data $data)
|
|
Encodes the given data into a query string format
Tags:
Parameters
$data |
$data |
- array of string elements to be encoded |
|