473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need help with Snoopy class function

Dear all,

I am brand new to php, but learning quickly. I need to be able to go
to website, obtain the form elements, cycle through the form elements,
fetch the links for each page that results from the submission of the
form elements, and then fetch all the content of the pages refered in
the links (its approx 115,000 links). If i understand it right,
Snoopy is the way to go with this. But the problem is, is that we
cannot get snoopy to work (expect for the submit function). I have
gone through all the text files that come with snoopy, and even when
we just cut and paste the example code from the text files, it does
not work. for example, when we pasted the fetchtext function example
code we got the following error:
.............

Notice: Undefined variable: postdata in
c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1153

Warning: fsockopen(): php_network_getaddresses: gethostbyname failed
in c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1092

Warning: fsockopen(): unable to connect to lnk.ispi.net:80 in
c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1092
Notice: Uninitialized string offset: 0 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 23

Notice: Uninitialized string offset: 1 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 24

Notice: Uninitialized string offset: 2 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 25

.............
we made absolutely no changes to the code, just a simple cut and
paste. Given the way that snoopy is discussed on various groups, we
get the feeling that this is a really easy class function to use,
which leads us to believe that we are missing some very simple step.
please if anybody can help us out we would be greatful, or better yet,
if anybody has done a task simular to ours at hand, if you could just
post some code as to how you did it....thank you for your time.

toby
Jul 17 '05 #1
6 4134
to**********@hotmail.com (toby casey) wrote in message news:<ba**************************@posting.google. com>...
Dear all,

I am brand new to php, but learning quickly. I need to be able to go
to website, obtain the form elements, cycle through the form elements,
fetch the links for each page that results from the submission of the
form elements, and then fetch all the content of the pages refered in
the links (its approx 115,000 links). If i understand it right,
Snoopy is the way to go with this. But the problem is, is that we
cannot get snoopy to work (expect for the submit function). I have
gone through all the text files that come with snoopy, and even when
we just cut and paste the example code from the text files, it does
not work. for example, when we pasted the fetchtext function example
code we got the following error:
............

Notice: Undefined variable: postdata in
c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1153

Warning: fsockopen(): php_network_getaddresses: gethostbyname failed
in c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1092

Warning: fsockopen(): unable to connect to lnk.ispi.net:80 in
c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1092
Notice: Uninitialized string offset: 0 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 23

Notice: Uninitialized string offset: 1 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 24

Notice: Uninitialized string offset: 2 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 25

............
we made absolutely no changes to the code, just a simple cut and
paste. Given the way that snoopy is discussed on various groups, we
get the feeling that this is a really easy class function to use,
which leads us to believe that we are missing some very simple step.
please if anybody can help us out we would be greatful, or better yet,
if anybody has done a task simular to ours at hand, if you could just
post some code as to how you did it....thank you for your time.
We are running php 4.3.7, windows xp, and the Windows IIS
toby

Jul 17 '05 #2
to**********@hotmail.com (toby casey) wrote in message news:<ba*************************@posting.google.c om>...
to**********@hotmail.com (toby casey) wrote in message news:<ba**************************@posting.google. com>...
Dear all,

I am brand new to php, but learning quickly. I need to be able to go
to website, obtain the form elements, cycle through the form elements,
fetch the links for each page that results from the submission of the
form elements, and then fetch all the content of the pages refered in
the links (its approx 115,000 links). If i understand it right,
Snoopy is the way to go with this. But the problem is, is that we
cannot get snoopy to work (expect for the submit function). I have
gone through all the text files that come with snoopy, and even when
we just cut and paste the example code from the text files, it does
not work. for example, when we pasted the fetchtext function example
code we got the following error:
............

Notice: Undefined variable: postdata in
c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1153

Warning: fsockopen(): php_network_getaddresses: gethostbyname failed
in c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1092

Warning: fsockopen(): unable to connect to lnk.ispi.net:80 in
c:\inetpub\wwwroot\gasearch\dev\test files\Snoopy.class.inc on line
1092
Notice: Uninitialized string offset: 0 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 23

Notice: Uninitialized string offset: 1 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 24

Notice: Uninitialized string offset: 2 in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopyfetch.php on line 25

............
we made absolutely no changes to the code, just a simple cut and
paste. Given the way that snoopy is discussed on various groups, we
get the feeling that this is a really easy class function to use,
which leads us to believe that we are missing some very simple step.
please if anybody can help us out we would be greatful, or better yet,
if anybody has done a task simular to ours at hand, if you could just
post some code as to how you did it....thank you for your time.


We are running php 4.3.7, windows xp, and the Windows IIS

toby

Does Snoopy have some kind of configuration file that needs to be set?
It almost seems like the variables are not coming through, which makes
me wonder if Snoopy assumes that the posted variables are
automatically becoming global variables. If so, check to see if
register_globals is set in the php.ini file.
Jul 17 '05 #3
i have been reading everything that i can get my hands on, and have
fixed alot of problems, but i am still getting this error msg:

PHP Notice: Undefined index: query in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopy
stuff\Snoopy.class.inc on line 147

along with a few others. but primarily this one and the same error
for line 132 (same file) Any time snoopy.class.inc uses the "scheme"
it gives an undefined index error....i am really going crazy....I am
assuming that this must be a problem on my computer, because after
reading all the group postings that i can find that discuss snoopy,
lots of ppl use it. are there any changes that "must" be made in the
varible settings and/or php.ini....if somebody can, please help.

toby
Jul 17 '05 #4
to**********@hotmail.com (toby casey) wrote in message news:<ba**************************@posting.google. com>...
i have been reading everything that i can get my hands on, and have
fixed alot of problems, but i am still getting this error msg:

PHP Notice: Undefined index: query in
c:\inetpub\wwwroot\gasearch\dev\test files\snoopy
stuff\Snoopy.class.inc on line 147

along with a few others. but primarily this one and the same error
for line 132 (same file) Any time snoopy.class.inc uses the "scheme"
it gives an undefined index error....i am really going crazy....I am
assuming that this must be a problem on my computer, because after
reading all the group postings that i can find that discuss snoopy,
lots of ppl use it. are there any changes that "must" be made in the
varible settings and/or php.ini....if somebody can, please help.


An undefined index error normally means you're doing something like
this:

$howManyUsers = $userInfo["userCount"];

when no value has ever been placed into the "userCount" index of the
array $userInfo.

See anything like that?
Jul 17 '05 #5
>
An undefined index error normally means you're doing something like
this:

$howManyUsers = $userInfo["userCount"];

when no value has ever been placed into the "userCount" index of the
array $userInfo.

See anything like that?

that is exactly what is see, but it is in the code of the class
function, and everybody else in the world seems to be using snoopy
successfully....i am thinking that maybe there is a setting in my
php.ini file that i have incorrectly set...if anybody out there is
willing, i would love to take a look at somebody php.ini file that has
ran snoopy successfully. i know its asking alot, and is probably not
the most security minded thing to do, but i have nobody that i can go
to for immediate help, and would just like to know for certain that my
ini is setup right.
toby
to**********@hotmail.com
Jul 17 '05 #6
to**********@hotmail.com (toby casey) wrote in message news:<ba**************************@posting.google. com>...

An undefined index error normally means you're doing something like
this:

$howManyUsers = $userInfo["userCount"];

when no value has ever been placed into the "userCount" index of the
array $userInfo.

See anything like that?

that is exactly what is see, but it is in the code of the class
function, and everybody else in the world seems to be using snoopy
successfully....i am thinking that maybe there is a setting in my
php.ini file that i have incorrectly set...if anybody out there is
willing, i would love to take a look at somebody php.ini file that has
ran snoopy successfully. i know its asking alot, and is probably not
the most security minded thing to do, but i have nobody that i can go
to for immediate help, and would just like to know for certain that my
ini is setup right.
toby
to**********@hotmail.com


My guess is that most PHP coders don't code with error_reporting set
to all. They should, but they don't. I don't code with error_reporting
on max either, instead I set it there when I'm debugging.

Change your error reporting level to make the error messages
disappear. Or, better, edit Snoopy so that the line that generates the
error is wrapped in an if (isset($dog["color"])) block.
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers...
0
by: ChronoFish | last post by:
Hello, Snoopy is reporting: Warning: MagpieRSS: Failed to fetch http://some.domain.com/atom.xml. (HTTP Response: HTTP/1.0 407 Proxy Authentication Required ) in \web\rss\magpie\rss_fetch.inc...
8
by: JustSomeGuy | last post by:
I need to write an new class derived from the list class. This class stores data in the list to the disk if an object that is added to the list is over 1K in size. What methods of the std stl...
4
by: futureofphp | last post by:
I need to access a website, Fetch the data, and then logout. Please tell me where I am wrong. I dont think its logging out properly. <? include "Snoopy.class.php"; $snoopy = new Snoopy; ...
2
by: _mario.lat | last post by:
I'd like to get text of a webpageB that I reach by putting a login and a password in a webpageA. I mean: I'd like to get text of a WebPageB with a php script. But before I can see WebPageB I...
1
by: mich dobelman | last post by:
I am using the snoopy.class.php to send some http request. Does anyone know if it allows to send request with specific encoding? What i want to do is sending japanese as a parameter. But always...
18
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before....
10
by: brett | last post by:
I have a file named Snoopy.class.php on my hosted web server in a directory called d:\home\ABC.COM\blog\wp-content\plugins\ A file named dahnielson_mimetex.php references it. However, when...
0
by: regisma | last post by:
Hi, I will like to use Snoopy class to check the rate and the price to ship a box with Fedex. I have begun with this code but I cannot do domething usefull with it yet. Can someone can...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.