Applied Managment PhD DegreePh.Ds in Applied Mangement

College Degree Finder

Companies seek both experienced and educated workers to fill management positions. Lorem ipsum dolor sit amet,
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Matching School Ads| 1 | 2 | 3 | next

$value) {
if($value == 'all'){
$value ="";
} elseif($value == 'either'){
$value ="both";
}
$$key=strtoupper($value);
}

// change to current directory so we can use relative paths
chdir(dirname(__FILE__));
// read in the template. we need to do this because we have to url encode
// it before we can send it to sl.qmp.quinstreet.com, but if we leave it
// as an html file on disk it's easier to edit. make as many templates as you
// want/need and just set $template to the name (without .html) before including
// this file.
$slTemplate = file_get_contents("degree-finder-template.html");
// now we need to create a proper request object that sl.qmp.quinstreet.com will
// understand. hand-creating json is a pain, so we'll use stdClass objects to build
// the request, then json_encode to convert the objects into a properly formed JSON
// string.
$request = new stdClass();
// this example code only handles a single widget (school listing) on the page … in order to pass
// multiple SL widgets into the rendering server you'll have to add multiple request
// objects into a single POST. see the documentation for how to do this.
$request->id = "main";
// change the below to the webSiteName issued to you by QuinStreet
$request->webSiteName = "collegeatlas.org";
$request->affiliateKey ="20842680";
$request->tag ="204291449";
// this is probably still right for you
$request->webPageUri = "/";
// this value is given to you by QuinStreet
$request->widgetInstanceKey = "18385010";
// for this example, show both campus and online schools
$request->campusType = "CAMPUS";
// $aoi/$doi are passed into this file by the file that you included in your page.
$request->areaOfInterest = "PSYCHOLOGY";
$request->degreeOfInterest = "BACHELOR";
$request->zip = $pc;
// encode the template – this is required
$request->template = rawurlencode($slTemplate);
// put the request into the 'widgets' wrapper – see the documentation
$postData = new stdClass();
$postData->widgets = array();
$postData->widgets[] = $request;
$postJson = json_encode($postData);
// we'll use cURL to do the http POST to the rendering server (sl.qmp.quinstreet.com)
// you probably don't want to change these values. pay particular attention to the low
// connect and transfer timeouts … keep them low and retry for best results (retry logic is below)
$curl_options = array(
CURLOPT_URL => "http://sl.qmp.quinstreet.com/",
CURLOPT_PORT => 80,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postJson,
CURLOPT_HEADER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_AUTOREFERER => true,
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_TIMEOUT => 5
);
// init the curl handler
$ch = curl_init();
// set the options
curl_setopt_array($ch, $curl_options);
// setup our retry logic … this example retries two times if any cURL error or http code other than 200
// is returned
$tries = 0;
$err = -1;
$httpCode = -1;
while ($tries++ <= 0="" 2="" &&="" ($err="" !="=" ||="" $httpcode="" 200))="" {="" $result="curl_exec($ch);" $info="curl_getinfo($ch);" $err="curl_errno($ch);" }="" curl_close($ch);="" check="" for="" successful="" result="" if="" 200)="" houston,="" we="" have="" a="" problem.="" you="" might="" want="" to="" redirect="" here="" an="" error="" page="" on="" your="" site?="" log="" this="" server?="" probably="" don't="" do="" what="" we're="" going="" here,="" but="" will="" suffice="" as="" example="" echo="" "no="" schools="" found="" or="" there="" was="" problem,="" please="" try="" again="" later.="" (error:="" $err,="" http="" code:="" $httpcode)";="" else="" success!!!="" ...="" the="" decoded="" results="" $resultobj="json_decode($result);" urldecode($resultobj-="">main->renderedListing);
}
?>


Enjoy this post? Don't forget to share.