Add AdGroups SOAP Request and Response for Google adWords API v200906

August 7th, 2009 Comments off

Below you will find the raw SOAP request and response messages to successfully add new AdGroups to a campaign in the the adWords v200906 sandbox environment.

Read more…

Categories: Uncategorized Tags:

MSN adCenter GetAccounts operation SOAP request

July 17th, 2009 2 comments

Below is a sample of a functioning SOAP request which accesses the version 6 GetAccounts operation of the MSN adCenter API CustomerManagement service.

Read more…


MSN adCenter API V6 Proxy Services

June 16th, 2009 Comments off

The MSN adCenter API V6 has 5 different services which authorized users can use to manage adCenter accounts. These 5 services are:

Administration Service – /Administration/AdministrationService.svc
The Administration Service currently handles operations that handle quota data. There are only two operations in the Administration Service at this time (GetAssignedQuota, GetRemainingQuota).

Read more…


SOAP Request/Response for the adCenter API V6 GetNotifications operation

June 11th, 2009 Comments off

Below you will find raw a successful SOAP request generated by PHP and NuSOAP/0.7.3 and the subsequent successful SOAP request that was returned by adCenter API V6 for accessing the GetNotifications operation of the NotificationManagement service. There are a couple important things to note here

Read more…

Categories: Uncategorized Tags:

MSN adCenter Version 6 APIs

June 5th, 2009 Comments off
Categories: adCenter API Tags: , ,

AdWords API Sandbox v2009 CampaignService->mutate() SOAP request

May 20th, 2009 1 comment

Here is an example of a successful, raw SOAP request to the mutate() operation of the AdWords API v2009 CampaignService that was made on May 20, 2009:

Read more…


Search Marketing API GeoTargeting Limitations

May 7th, 2009 Comments off

I have had the ‘priviledge’ of spending a good amount of time with the Yahoo Search Marketing API as of late, and I must say, while having the ability to use an API to connect to a Yahoo Search Marketing account is awesome, I am less then impressed with how Yahoo has implemented many of it’s services and operations.  One topic area that has had my attention recently is working with the TargetingService operations and being able to programmatically update the GeoLocations of a campaign and/or adgroup. Maybe I am taking this ability for granted, but it would definitely be nice to geotarget more than 250 geolocations at once within a campaign/adgroup. Not only that, I w0uld highly suggest to Yahoo, and I have, that this limit be specifically stated in the Yahoo Search Marketing API documentation.  I have checked the release notes, the updateTargetingProfileForCampaign operation notes, and all of the child documentation for that operation. Even when you log into the Yahoo! Marketing Solutions user interface and drill down into the Campaign Settings for a campaign, there is no mention of any sort of limitation on the number of locations you can geotarget.


Quickly duplicating MySQL table structures

May 1st, 2009 Comments off

I often find myself duplicating table structures to either do some testing or duplicating a database structure from one database to another. Most of the time,  I find that I do not need to copy the existing data to the new database table. The easiest way I have found to do this is using MySQL’s CREATE TABLE…LIKE… () syntax. Even the most basic form can fulfill most requirements. This form could be something like:

CREATE TABLE `bar` LIKE `foo`;

For the MySQL 5.1 reference page, go here:  http://dev.mysql.com/doc/refman/5.1/en/create-table.html

Categories: MySQL Tags: ,

PHP’s error reporting levels

April 30th, 2009 Comments off

The drudgery and pain of debugging and fine-tuning PHP can be alleviated when one takes full advantage of PHP’s various  error reporting levels that can be changed both in the config and on the fly at run time. To change the error reporting level on the fly during execution of a script, use PHP’s error_reporting() function (http://us.php.net/manual/en/function.error-reporting.php).  The error_reporting function takes a single int parameter which can be anyone of the following values

  • 1 (E_ERROR)
  • 2 (E_WARNING)
  • 4 (E_PARSE)
  • 8 (E_NOTICE)
  • 16 (E_CORE_ERROR)
  • 32 (E_CORE_WARNING)
  • 64 (E_COMPILE_ERROR)
  • 128 (E_COMPILE_WARNING)
  • 256 (E_USER_ERROR)
  • 512 (E_USER_WARNING)
  • 1024 (E_USER_NOTICE)
  • 2048 (E_STRICT)
  • 4096 (E_RECOVERABLE_ERROR)
  • 8192 (E_DEPRECATED)
  • 16384 (E_USER_DEPRECATED)
  • 30719 (E_ALL)

Let’s say you actually wanted to implement the E_STRICT level in a single PHP script. Adding the following code, most likely at the top of your script will handle this:

<?php
error_reporting(2048);
?>

Downloading and Converting EWS BulkDownload TSV Files

April 28th, 2009 Comments off

For the longest time, I avoided using the BulkDownload service of Yahoo’s Enterprise Web Services (EWS) for managing our daily pay per click (PPC) account. Now this wasn’t because I did not want to use it, I just thought it was was going to be a severe pain to get it implemented. The reasoning for my hesitation in implementing the BulkDownload feature was because I was pretty ignorant to different encodings. Now that my knowledge of encoding types has blossomed over time, I felt I was ready to tackle the project of using and implementing Yahoo’s BulkDownload service in a complete daily account synchronization for avery large PPC account structure.

When using Yahoo’s EWS BulkDownload service, you can request one of two file formats to be returned to you. These two file formats are:

  • EXCEL_XML – an Excel 2003 XML format
  • TSV (tab seperated value)

Here is the trickey part: the EXCEL_XML files are UTF-8 encoded and the TSV files are returned in UTF-16LE encoding.  Normally, I like to use comma seperated value (CSV) file formats and use the LOAD DATA [LOCAL] INFILE  syntax of MySQL. (One can just as easily use TSV file formats with the LOAD DATA [LOCAL] INFILE syntax. You just need to make sure you specify

FIELDS TERMINATED BY '\t'

instead of

FIELDS TERMINATED BY ','

in your SQL statement.) Bacause of the TSV file coming in as UTF-16LE encoded, simply grabbing the tab seperated value file and loading it right into MySQL would not work. My solution would just involved a couple extra steps; once I retrieved the account structure file from Yahoo, I would simply loop back through the file and convert the data of the file from ‘utf-16′ to ‘ascii’ using PHPs iconv() function. This can obviously be done in multiple ways, but here would be one way to accomplish the task:

while (!feof($handleIn))
 {
    $content = iconv('utf-16', 'ascii', fread($handleIn, 8192));
    fwrite($handleOut,$content);
 }

Once the file has been successfully converted over to ascii, I can then run a LOAD DATA [LOCAL] INFILE to get the TSV file into a MySQL table:

LOAD DATA local INFILE '[file_name]'
INTO TABLE [table_name]
FIELDS TERMINATED BY '\t' optionally ENCLOSED BY '\"' LINES TERMINATED BY '\n'
IGNORE 2 LINES;

The reason for the IGNORE 2 LINES is because the first two lines of TSV file are basically header rows and I consider them to be junk rows.