Skip to content

Instantly share code, notes, and snippets.

@pierre-dickinson
Last active November 29, 2018 14:30
Show Gist options
  • Save pierre-dickinson/bc4b3717a9d1c3e83568a99b0d9ca344 to your computer and use it in GitHub Desktop.
Save pierre-dickinson/bc4b3717a9d1c3e83568a99b0d9ca344 to your computer and use it in GitHub Desktop.
webhose query in php format for site:mono.com
<?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