API for webmasters v1 - Depreciated

Eporner API v1 - deprecated

Note:This API version is depreciated and will be removed after May 2020. Please use new Eporner API v2

Looking for RSS feed ?


We have published our site API for all webmasters who wants to publish our movies on their sites. Our API is based on well-known XML language and should be really simple to implement. We also prepared some examples in PHP to make it easiest for you.

XML schema

Please note that new videos have string id (11 chars, string) !

Sample code

<?php
/**************** XML PARSER DO NOT MODIFY **************/
class movie {
var $id; // Movie ID
var $title; // Movie title
var $keywords; // Movie keywords
var $loc; // Movie Watch URL
var $download; // Movie Download URL
var $imgthumb; // Preview image thumbnail
var $imgfull; // Preview image full
var $added; // Movie add date (UNIX timestamp)
var $added2; // Movie add date (YYYY-mm-dd HH:MM format)
var $lenghtsec; // Movie lenght in seconds
var $lenghtmin; // Movie lenght (MM:SS format)
var $embedscript; // URL to javascript file inserting embeded movie to your site
function movie ($aa)
{
foreach ($aa as $k=>$v)
$this->$k = $aa[$k];
}
}
function readDatabase($filename)
{
// read the XML database of aminoacids
$data = implode("", file($filename));
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, $data, $values, $tags);
xml_parser_free($parser);
// loop through the structures
foreach ($tags as $key=>$val) {
if ($key == "movie") {
$movranges = $val;
// each contiguous pair of array entries are the
// lower and upper range for each movie definition
for ($i=0; $i < count($movranges); $i+=2) {
$offset = $movranges[$i] + 1;
$len = $movranges[$i + 1] - $offset;
$tdb[] = parseMov(array_slice($values, $offset, $len));
}
} else {
continue;
}
}
return $tdb;
}
function parseMov($mvalues)
{
for ($i=0; $i < count($mvalues); $i++) {
$mov[$mvalues[$i]["tag"]] = $mvalues[$i]["value"];
}
return new movie($mov);
}
/****************** END XML PARSER *********************/
$db = readDatabase("https://www.eporner.com/api_xml/all/5"); // return last 5 movies
// $db = readDatabase("https://www.eporner.com/api_xml/anal/5"); // change to this to return last 5 anal movies
$count=count($db); // number of movies readed from file
for($i=0; $i<=$count-1; $i++)
{
?>
<table>
<tr>
<td>
<img src="<? echo($db[$i]->imgthumb); ?>">
</td>
<td>
<h1><a href="<? echo($db[$i]->loc); ?>"><? echo($db[$i]->title); ?></a></h1>
<h2><? echo($db[$i]->keywords); ?></h2>
<h3>Movie added: <? echo($db[1]->added2); ?> | Lenght: <? echo($db[1]->lenghtmin); ?></h3>
<a href="<? echo($db[$i]->loc); ?>">WATCH</a>
</td>
</tr>
</table>
<br /> <br />
<?
}
?>

XML address

URL scheme looks like this:

https://www.eporner.com/api_xml/ KEYWORDS / NUMBER_OF_MOVIES

Where KEYWORDS are the keywords of the movies you like to display eg. "anal", "black", "blowjob" OR "all" you you want to display all movies NUMBER_OF_MOVIES is number of movies you would like to display on your site. For example 5, 10, 15, 30


Sample URLs:
https://www.eporner.com/api_xml/all/5
https://www.eporner.com/api_xml/anal/10
https://www.eporner.com/api_xml/girlfriend/45


If you want to get all movies list try this (filesize is over 25MB):
https://www.eporner.com/api_xml/all/1000000

PHP Examples

List of last 5 movies with thumbnails:

Preview: https://www.eporner.com/api_example2

Source code: https://www.eporner.com/api_src/api_example2



Last 5 movies with embed watch code:

Preview: https://www.eporner.com/api_example1



Source code: https://www.eporner.com/api_src/api_example1

Popular videos

Popular videos scheme:

https://www.eporner.com/api_xml/popular/ NUMBER_OF_MOVIES

Where NUMBER_OF_MOVIES is number of movies you would like to display on your site. For example 5, 10, 15, 30. Max for popular videos is 32.

Advanced URL scheme

Advanced URL scheme:

https://www.eporner.com/api_xml/ KEYWORDS / NUMBER_OF_MOVIES / START_FROM / ORDER_BY

Where KEYWORDS are the keywords of the movies you like to display eg. "anal", "black", "blowjob" OR "all" you you want to display all movies

NUMBER_OF_MOVIES is number of movies you would like to display on your site. For example 5, 10, 15, 30

START_FROM is the number of movies you would like to skip from the beginning of list

ORDER_BY is movies sorting. Currently supported "adddate" and "id". Movies sorted by "adddate" will change every database update. Movies sorted by "id" will be always the same.



Sample advanced URLs:

https://www.eporner.com/api_xml/ all/10/0/id

https://www.eporner.com/api_xml/ all/10/5/id

https://www.eporner.com/api_xml/ blowjob/5/10/adddate

https://www.eporner.com/api_xml/ anal/15/0/adddate

Note:This API version is depreciated. New Eporner API v2 allow you to do more advanced queries.
Cookies help us deliver our services. By using our services, you agree to our use of cookies. [ X ]