document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("12\n");
document.write("13\n");
document.write("14\n");
document.write("15\n");
document.write("16\n");
document.write("17\n");
document.write("18\n");
document.write("19\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\"><span class=\'source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html\'>&lt;?php\n");
document.write("<span class=\'meta meta_function meta_function_php\'><span class=\'storage storage_type storage_type_function storage_type_function_php\'>function<\/span> <span class=\'entity entity_name entity_name_function entity_name_function_php\'>do_search<\/span>(<span class=\'meta meta_function meta_function_arguments meta_function_arguments_php\'><span class=\'meta meta_function meta_function_argument meta_function_argument_no-default meta_function_argument_no-default_php\'> <span class=\'variable variable_other variable_other_php\'>$query<\/span><\/span>,<span class=\'meta meta_function meta_function_argument meta_function_argument_no-default meta_function_argument_no-default_php\'> <span class=\'variable variable_other variable_other_php\'>$key<\/span><\/span>,<span class=\'meta meta_function meta_function_argument meta_function_argument_no-default meta_function_argument_no-default_php\'><span class=\'storage storage_modifier storage_modifier_php\'> &amp;<\/span><span class=\'variable variable_other variable_other_php\'>$num<\/span> <\/span><\/span>)<\/span>\n");
document.write("{\n");
document.write("    <span class=\'storage storage_modifier storage_modifier_php\'>global<\/span> <span class=\'variable variable_other variable_other_php\'>$soapclient<\/span>;\n");
document.write("    <span class=\'storage storage_modifier storage_modifier_php\'>global<\/span> <span class=\'variable variable_other variable_other_php\'>$soapoptions<\/span>;\n");
document.write("\n");
document.write("    <span class=\'variable variable_other variable_other_php\'>$params<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'meta meta_array meta_array_php\'><span class=\'support support_function support_function_construct support_function_construct_php\'>array<\/span>(\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>key<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'variable variable_other variable_other_php\'>$key<\/span>, <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// the Developer\'s key<\/span>\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>q<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'variable variable_other variable_other_php\'>$query<\/span>, <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// the search query<\/span>\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>start<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>,      <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// the point in the search results<\/span>\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>maxResults<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>10<\/span>, <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// the number of search results<\/span>\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>filter<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'constant constant_language constant_language_php\'>false<\/span>, <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// should the results be filtered?<\/span>\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>restrict<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'><\/span>\'<\/span>,\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>safeSearch<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'constant constant_language constant_language_php\'>false<\/span>,\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>lr<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'><\/span>\'<\/span>,\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>ie<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'><\/span>\'<\/span>,\n");
document.write("                <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>oe<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'><\/span>\'<\/span>\n");
document.write("        )<\/span>;\n");
document.write("<span class=\'source source_php\'>?<\/span>&gt;<\/span>\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/402023.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/402023\">Pastie #402023<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");

