Example #1
0
  '</getGzipReportDownloadUrl>';
$report_url = $report_service->call('getGzipReportDownloadUrl', $request_xml);
$report_url = $report_url['getGzipReportDownloadUrlReturn'];
if ($debug) show_xml($report_service);
if ($report_service->fault) show_fault($service);
echo 'Report is available at "' . $report_url . '".' . "\n";
*/
#Show Report.
$request_xml = '<getReportDownloadUrl>' . '<reportJobId>' . $job_id . '</reportJobId>' . '</getReportDownloadUrl>';
$report_url = $report_service->call('getReportDownloadUrl', $request_xml);
$report_url = $report_url['getReportDownloadUrlReturn'];
if ($debug) {
    show_xml($report_service);
}
if ($report_service->fault) {
    show_fault($service);
}
echo 'Report is available at "' . $report_url . '".' . "\n";
function show_xml($service)
{
    echo $service->request;
    echo $service->response;
    echo "\n";
}
function show_fault($service)
{
    echo "\n";
    echo 'Fault: ' . $service->fault . "\n";
    echo 'Code: ' . $service->faultcode . "\n";
    echo 'String: ' . $service->faultstring . "\n";
    echo 'Detail: ' . $service->faultdetail . "\n";
 echo "Doing {$c}\n";
 while ($row = $dbr->fetchObject($res)) {
     $t = Title::makeTitle(NS_MAIN, $row->st_title);
     echo "\tChecking {$t->getText()}\n";
     # Create keyword structure.
     $keyword = '<keywordText>' . htmlspecialchars($t->getFullText()) . '</keywordText>' . '<keywordType>Exact</keywordType>' . '<language>en</language>';
     # Check keyword traffic.
     $request_xml = '<checkKeywordTraffic>' . '<requests>' . $keyword . '</requests>' . '</checkKeywordTraffic>';
     try {
         $estimates = $estimator_service->call('checkKeywordTraffic', $request_xml);
         $estimates = $estimates['checkKeywordTrafficReturn'];
         if ($debug) {
             show_xml($estimator_service);
         }
         if ($estimator_service->fault) {
             show_fault($estimator_service);
         }
     } catch (Exception $e) {
     }
     # Display estimate.
     switch ($estimates) {
         case 'HasTraffic':
             $map[$row->st_id] = 2;
             $val = 2;
             $vol++;
             break;
         case 'VeryLowTraffic':
             $map[$row->st_id] = 1;
             $val = 1;
             break;
         default:
Example #3
0
					$account_info = $account_info['getAccountInfoReturn'];
					
					if($account_info['customerId']!='')
						{
							?>
					
                    			<div style="display:block; background-color:#DDFFDD; color:#00AA00; padding:5px;"><strong>Connected to Google API Successfully</strong></div>     
                            
                            <?php						
						}
					else
						{
							?>
                                 
                                 <div style="display:block; background-color:#FFDDDD; color:#AA0000; padding:5px;"><strong>Could Not Connect To Google API:</strong><br />								
                                		<?php show_fault($account_service); ?>
                                 </div>
                            
                            <?php						
						}					
					
				  ?>
                  
                  
                  <?php if($link && $account_info['customerId']!='' && $email!='' && $password!='' && $client_email!='' && $useragent!='' && $developer_token!='' && $application_token!='' && $application_token!='' && $db_location!='' && $db_username!='' && $db_password!='' && $db_database!='') { ?>
                                    
                    <div style="padding:15px; line-height:26px; margin-top:10px; margin-bottom:20px; background-color:#FFFFCC; border:2px dotted #CCCC33;">
            
 					<strong>Step 4 complete! If all 4 steps are complete, you can now login to tracker by <a href="index.php">clicking here</a></strong>
                    
            		</div>