Managing your own ads/blocks with OpenAds

I want to track my own blocks of banners with OpenAds.

Also those blocks must be embeded in the page – so iframe is not a solution.

What I want is to have OpenAds to trigger and decide which ads block to display.

What I have done is to create a text add , take the local (php) invocation code and put it in the place where the add will be displayed. Also I have made some modifications in the original include PHP code – strip the escaping and keeping the tracking html code.

  //<!--/* OpenX Local Mode Tag v2.6.4 */-->

  define('MAX_PATH', '/home/domains/guda/ads/openx-2.6.4');

  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    $phpAds_raw = view_local('', 4, 0, 0, '', '', '0', $phpAds_context, '');

 if (!empty($phpAds_raw['html'])) {
	$openx_tracking = "";
	$code = preg_replace_callback('/(<div.*?<\/div>)/', create_function(
			'global $openx_tracking; $openx_tracking = $matches[0];  return "";'
		), $phpAds_raw['html']);

	$code = html_entity_decode($code, ENT_QUOTES);

	$payed_company = array();
	$my_own_content = ob_get_contents();

	echo $my_own_content;
	echo $openx_tracking;

Notice that the code is slightly changed.

And here is the text Ad content:

$payed_company = array("id" => "3617", "title" => '', "payed" => true);

As you see this way you can “connect” the ads for a company with certain element from your page.

With this code you will be able to track the impressions of your block code.

Any help on the the tracking of the clicks will be welcome.

Wonderful XPath Tutorial

It is total time saving to learn XPath from this tutorial – fast and not like the USA style books.


I have made a mirror on the tutorial because I aways forgot XPath


Monty Hall Problem simulation

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice? (Whitaker 1990)



Continue reading


iptables configuration script firewall – http://tje.ssllink.net/firewall/

test driven development website: http://www.testdriven.com/modules/news/

Source code websites




Articles: http://thedailywtf.com/

Post & Get requests

Post using curl

curl  -A ‘Mozilla/4.0’  -F “vote=5&btnSubmit.x=34&btnSubmit.y=14&btnSubmit=%D0%A0%D0%B5%D0%B3%D0%B8%D1%81%D1%82%D1%80%D0%B8%D1%80%D0%B0%D0%B9” http://www.germanos-konkurs.com/

Semantic web




good blog (bg)

lecutre in bg

Forum based search engine http://www.omgili.com/

Bulgarian stopwords

I want to start such a list so I will become maintain a Bulgarian list here which I will use for my website www.cenite.com

As a base source I will use this list here

Please submit your suggestions.

Note: I have removed a lot of words from the starting list.

 Continue reading

Thumbnail for a webpage

My colegue bl8cki is real fan of making screenshots from web browsers. Those days he tries the python solution. And today he surprised all with one very nice firefox plugin

With this plugin you can use firefox with some command line parameters to make screenshots.

Here is how we will use it

  1. start the xvfb
    mkdir /tmp/tmpfbdir
    Xvfb :1 -ac -screen 0 1600x1200x24  -fbdir /tmp/tmpfbdir

  2. run the firefox
    firefox-2 --display=:1 --no-xshm -height 1024 -width 768 -savepng http://www.cenite.com

Windows solutions


http://web-tourist.net/login/login/view.php?st=1193 h



Multiplatform – I cant manage to compile it:

http://cutycapt.sourceforge.net/ http://iecapt.sourceforge.net/






Another Linux/Ubuntu way:

aptitude install xvfb  xfs xfonts-scalable xfonts-100dpi libgl1-mesa-dri  subversion libqt4-webkit libqt4-dev g++
svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
cd cutycapt/CutyCapt
xvfb-run --server-args="-screen 0, 1024x768x24" ./CutyCapt --url=http://www.google.com --out=example.png
xvfb-run --server-args="-screen 0, 1024x768x24" ./CutyCapt --url=http://www.google.com --out=example.html --out-format=html


Opera beautifully engineered…for my desktop

I was nice surprised when I tried Opera browser for PC after aprx. one year Firefox usage.

Zooming is faster and smarter than in every browser that I have used.

Firefox boot like MS Windows, and is almost stable like it.

Opera is faaaaast. Gmail is fast. And my work is going fast because all webpages are opening fast.

What? Why you need faster browser if it doesnt support right CSS, DOM, or what ever?

Who said this ? Check the tests for CSS2 and see that Opera and FF are failing apx on the same tests on the same places I am not sure even who is the winner. Check also this those acid tests also

Does someone has tried the dragonfly plugin – analog for the firefox firebug ?

I must agree that the Opera release 9.50 (Build 10063) has some strange javascript support. It happends that when I paste an URL for RSS in Opera, the current page disapears, maybe this is a feature and not a bug :)

Also I am very very disapointed that I should write this article in FF because the build-in WordPress editordoesnt work for Opera :)

© 2024 Gudasoft

Theme by Anders NorénUp ↑