SMF Support > SMF 2.0.x Support
Help me to add ads in wap2
Kevin1:
Hey guys i want to add Adiquity ad in my wap2 mode.. I read may tutorial but cant able to place ads.
I want to place this code
--- Quote ---<?php
/**************************************************************************
* Adiquity Ad Code - Adiquity.com
* Copyright Guruji.com Software Pvt Ltd . All rights reserved.
* Language: PHP (Curl)
* Version: 18072011
**************************************************************************/
$adq_params = array(
"ADQ_PARAMS" => array(
"pazid"=>"adqk35sh-14eoezzm-qqdqq",//PAZID
"adbgcolor"=>"FFFFFF", //Ad Unit Background color
"adtcolor"=>"0063DC", //Ad Unit Text color
)
);
/////////////////////////////////
// Do not edit below this line //
/////////////////////////////////
$params = array();
$params = array(
"ua=" . urlencode($_SERVER["HTTP_USER_AGENT"]),
"TIP=". urlencode($_SERVER["REMOTE_ADDR"]),
"aclang=". "php",
"acver=". "18072011" ,
"cat"=>"s1,en"
);
if (!empty($adq_params["ADQ_PARAMS"])){
foreach ($adq_params["ADQ_PARAMS"] as $k => $v){
$params[] = urlencode($k) . "=" . urlencode($v);
}
}
foreach ($_SERVER as $k => $v) {
if ((substr($k, 0, 4) == "HTTP") ||(substr($k, 0, 3) == "REQ")) {
$params[] = $k . "=" . urlencode($v);
}
}
$post = implode("&", $params);
$request = curl_init();
$request_timeout = 10; // 10 seconds timeout
$adq_url = "http://ads.adiquity.com/mads";
curl_setopt($request, CURLOPT_URL, $adq_url);
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($request, CURLOPT_TIMEOUT, $request_timeout);
curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $request_timeout);
curl_setopt($request, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded", "Connection: Close", "X-ADQ-pazid: adqk35sh-14eoezzm-qqdqq"));
curl_setopt($request, CURLOPT_POSTFIELDS, $post);
$contents = curl_exec($request);
if (curl_getinfo($request,CURLINFO_HTTP_CODE) == 200)
{
if ($contents === true || $contents === false)
$contents = "";
echo $contents;
}
curl_close($request);
?>
--- End quote ---
Oldiesmann:
Where do you want these ads to appear?
Kevin1:
At the top and bottom
Yoshi:
--- Quote from: Akram210712 on March 02, 2012, 03:36:29 PM ---At the top and bottom
--- End quote ---
At what places, there?
After the linktree, above the menu, ...?
Kevin1:
Bro yes above the menu..
Navigation
[0] Message Index
[#] Next page
Go to full version