From a44eee9e97a7851596e26de2c9e53fa569df7389 Mon Sep 17 00:00:00 2001 From: Jonas John Date: Thu, 9 Feb 2012 10:42:59 +0100 Subject: Initial commit (version 0.5 of May 2006) --- examples/demo_12.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 examples/demo_12.php (limited to 'examples/demo_12.php') diff --git a/examples/demo_12.php b/examples/demo_12.php new file mode 100755 index 0000000..68d524a --- /dev/null +++ b/examples/demo_12.php @@ -0,0 +1,44 @@ +set_user_agent('MyAgentName/0.9'); + + // set a new referer: + $wsql->set_referer('http://www.jonasjohn.de/custom/referer/'); + + + // connect to a URL + if (!$wsql->connect('url', 'http://codedump.jonasjohn.de/')){ + print 'Error while connecting: ' . $wsql->error; + exit; + } + + /* execute a query: + + This query returns all links: + */ + if (!$wsql->query('SELECT * FROM a')){ + print "Query error: " . $wsql->error; + exit; + } + + // fetch results as array + foreach($wsql->fetch_array() as $row){ + + print_r($row); + + } + +?> \ No newline at end of file -- cgit v1.2.3