-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
24 lines (22 loc) · 862 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <phpcpp.h>
#include "headers/google.h"
extern "C" {
PHPCPP_EXPORT void *get_module() {
static Php::Extension extension("google-scraper", "1.0");
extension.add<google_search>("google_search", {
Php::ByVal("query", Php::Type::String),
Php::ByVal("page", Php::Type::Numeric),
Php::ByVal("use_proxy", Php::Type::Numeric),
Php::ByVal("proxy", Php::Type::String),
Php::ByVal("proxy_auth", Php::Type::String)
});
extension.add<google_image>("google_image", {
Php::ByVal("query", Php::Type::String),
Php::ByVal("page", Php::Type::Numeric),
Php::ByVal("use_proxy", Php::Type::Numeric),
Php::ByVal("proxy", Php::Type::String),
Php::ByVal("proxy_auth", Php::Type::String)
});
return extension;
}
}