Home > Archive > PHP Pear > May 2005 > Re: [PEAR] Pear package like Snoopy
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR] Pear package like Snoopy
|
|
| Justin Patrin 2005-05-02, 8:57 pm |
| On 5/2/05, Rob Barreca <rob@electronicinsight.com> wrote:
> Not a direct Pear question, but I'm using Snoopy
> (http://snoopy.sourceforge.net) to check if sites link back to ours and
> it works great except for one url: http://www.thehealthinsurance.com
> When I do even a file_get_contents or anything it gives me a
>=20
> *Warning*: fsockopen(): php_hostconnect: connect failed in
> */home/www/valuestream.com/html/links/Snoopy.class.php* on line *1146*
>=20
> *Warning*: fsockopen(): unable to connect to
> www.thehealthinsurance.com:80 in
> */home/www/valuestream.com/html/links/Snoopy.class.php* on line *1146
>=20
> *Anyone have any thoughts on this? Is there a Pear package that works
> better?
>=20
HTTP_Request / HTTP_Client.
--=20
Justin Patrin
| |
| Rob Barreca 2005-05-02, 8:57 pm |
| Well, I tried using HTTP_Request thinking maybe it was Snoopy, but it
does not work remotely either. It's strange because when I run the
following code locally, it grabs the webpage, but my remote server can't
seem to "see" http://www.thehealthinsurance.com/. Anybody have any
thoughts on this?
When I go straight to the IP for http://www.thehealthinsurance.com/
(ping'd and found it was 69.36.176.169) it is actually a different web
page (http://www.italian-charms-and-bracelets.com/), so they have
multiple websites hosted on the same IP and I'm sure this is what's
causing the trouble, but don't know how to work around it.
require_once "HTTP/Request.php";
$req =& new HTTP_Request("http://www.thehealthinsurance.com/");
if (!PEAR::isError($req->sendRequest())) {
echo $req->getResponseBody();
} else {
print_r($req);
}
Rob Roy Barreca
________________________________________
__________
Electronic Insight ..... a web development company
Email .................. rob@electronicinsight.com
Website ................ www.electronicinsight.com
Justin Patrin wrote:
>On 5/2/05, Rob Barreca <rob@electronicinsight.com> wrote:
>
>
>
>HTTP_Request / HTTP_Client.
>
>
>
| |
| Rob Barreca 2005-05-02, 8:57 pm |
| The weird thing is that I do an outbound check from this remote server
on about 5000 other URLs. All of which come up fine. If I do a get on
yahoo.com from this server, it works. Along with the thousands of
checks that work everyday. So does that eliminate a,b,c,d? Or, could
say a DNS server work for 5000 other links and just be screwing this one up?
Rob Roy Barreca
________________________________________
__________
Electronic Insight ..... a web development company
Email .................. rob@electronicinsight.com
Website ................ www.electronicinsight.com
Justin Patrin wrote:
>On 5/2/05, Rob Barreca <rob@electronicinsight.com> wrote:
>
>
>
>So you're getting an fsockopen error? Your problem is that your remote
>server a) has these connections turned off in PHP, b) has a bogus /
>bad DNS server which is bungling the DNS lookup, c) has a firewall
>which stops outgoing traffic, d) is simply broken.
>
>
>
>
>I doubt that's your problem. It's called a virtual server and it's
>used all over the place. Ever had a shared hosting account? It's on a
>virtual server unless you have your own IP.
>
>
>
>
>
>
>
|
|
|
|
|