Fetch a url from snoopy using proxy

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
stallingjohn
Forum Newbie
Posts: 6
Joined: Mon Apr 23, 2007 2:16 am

Fetch a url from snoopy using proxy

Post by stallingjohn »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I am trying to fetch a url from snoopy using proxy
The url is:- http://www.ecademy.com/node.php?id=75667
but it gives the result as http://www.ecademy.com/node.php
When I do the same code without using proxy(commenting proxy) then it results http://www.ecademy.com/node.php?id=75667.

[u][b]Can anybody help me:[/b][/u]

The code is as follows:

Code: Select all

<?php
include "Snoopy.class.php";
$snoopy= new Snoopy;
$snoopy->proxy_host = "216.133.248.227"; // proxy host to use
$snoopy->proxy_port = "80"; // proxy port to use
$url="http://www.ecademy.com/node.php?id=75667";
$snoopy->fetch($url);
echo $snoopy->results;
?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply