Help Center Manage Your Account Ad Tag

How do I integrate AdSpeed mobile ad serving API?

This client library is used to fetch appropriate ad(s) from our mobile ad server and include the chosen ad code directly into your mobile website or mobile app. This approach requires downloading a client library and some programming knowledge from your side. It is suitable if:
  • You want to target more mobile devices, including both smart-phones and basic mobile handsets.
  • You want to rotate text ads, or a mix of both text and image ads

How it works

  1. Your website includes the client library to pre-fetch an ad
  2. Your website displays provided ad directly to end-users

Download

Download PHP class. Please visit this page frequently for updates or revisions.

Set Ad Serving Parameters

The client library can fetch ads from any zone or a specific ad. For serving ads in a zone, you will need the zone ID and additional selection parameters: ad format, ad dimension. Ad format can be:
  1. image banner ads only
  2. text link ads only
  3. or a mix between banners and text links
Flash/SWF ads and advanced HTML/Rich-Media ads are not currently supported in mobile ad serving due to the limit of mobile browsers.

Sample Code

This example shows how to use the provided PHP library to fetch and include an ad into your mobile website. It requires programming and technical integration on your side.
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html>
<head>
<title>Sample Mobile Site</title>
</head>

<body>
<h4>Sample Content</h4>
This is my test website optimized for mobile devices. 
It uses XHTML Mobile Profile (XHTML-MP)

<ul>
<li><a href="#link1">Test Link #1</a></li>
<li><a href="#link2">Test Link #2</a></li>
</ul>

<h4>Advertisement</h4>
Mixing banners and text link ads in a single ad placement.

<?php
include_once("AdSpeed.mobile.class.php");

$vAd = new AdSpeedAdServer();
$vAd->setFormat('text_image');
echo $vAd->fetch(array('oid'=>[YourID],'zid'=>[ZoneID],'wd'=>-1,'ht'=>-1));
?>

</body>
</html>
Print Was this helpful? Yes / No

Other Articles in Ad Tag

This section describes the ad tag (serving code) with basic and advanced settings. It includes common ad serving setup instructions and answers frequently asked questions when integrating the ad tag into your site, blog or app.

Cannot find an answer for your question? Ask our Customer Care team

Related