how to submit google page using snoopy

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
seco
Forum Newbie
Posts: 23
Joined: Tue Jan 08, 2008 10:40 pm

how to submit google page using snoopy

Post by seco »

Hi
how to submit google page and get the result page using snoopy class?

thanks in advance.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: how to submit google page using snoopy

Post by Benjamin »

Have you experimented or written any code?
seco
Forum Newbie
Posts: 23
Joined: Tue Jan 08, 2008 10:40 pm

Re: how to submit google page using snoopy

Post by seco »

yea

Code: Select all

<?php
require_once("snoopy.class.php");
 
$s=new Snoopy();
$form=array("q"=>"devnetwork");
$s->submit("http://www.google.com",$form);
echo $s->results;
?>
this code don't work because of the form vars sent i don't know what it should be
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: how to submit google page using snoopy

Post by Benjamin »

I would have to see the snoopy class or read the documents in order to answer your question. Is there any reason you are not able to do this?
seco
Forum Newbie
Posts: 23
Joined: Tue Jan 08, 2008 10:40 pm

Re: how to submit google page using snoopy

Post by seco »

thanks for reply
there no documentation just a little notes
just i want to know how the submit function accepts the form vars
in case of google site what is the form vars i show send?
thats all i need to know

thanks in advance.
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: how to submit google page using snoopy

Post by Mordred »

Code: Select all

$s->submit("http://www.google.com[b]/search[/b]",$form);
Post Reply