Last active
November 29, 2018 14:30
-
-
Save pierre-dickinson/bc4b3717a9d1c3e83568a99b0d9ca344 to your computer and use it in GitHub Desktop.
webhose query in php format for site:mono.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// These code snippet use our PHP client. Download from github | |
// Webhose::config("**********-***********-*********"); | |
//Helper method to print result: | |
function print_filterwebdata_titles($api_response) | |
{ | |
if($api_response == null) | |
{ | |
echo "<p>Response is null, no action taken.</p>"; | |
return; | |
} | |
if(isset($api_response->posts)) | |
foreach($api_response->posts as $post) | |
{ | |
echo "<p>" . $post->title . "</p>"; | |
} | |
} | |
//Perform a "filterWebContent" query | |
$params = array( | |
"q" => "site:mowno.com", | |
"ts" => "1540909494671", | |
"sort" => "crawled" | |
); | |
$result = Webhose::query("filterWebContent", $params); | |
print_filterwebdata_titles($result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment