/    Sign up×
Community /Pin to ProfileBookmark

I’ve seen some of the web based text browsers. I know there is a way to set a php proxy. While studying php, I have seen a few ways that you should be able to include anther url in the output. However, I can’t find a single thing that works.

I’ve been testing all kinds of clockwork scripts on the google home page only to find it doesn’t quite run like clock work. It seems this requires something more complex than just using fopen() and similar functions to get the page.

Does any one have any ideas? Is there something outside of php I have to do?

If you need more info ask me. Thanks to all replies.

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@bokehMay 02.2007 — fopen or file_get_contents should work ok. What problem are you having? Post your code.
Copy linkTweet thisAlerts:
@brasspenguinsauthorMay 03.2007 — [B]test.html:[/B]

(i got this from an example somewhere on w3schools.com)
[code=html]<i>Hello World</i>. Testing testing!<br />
Another day, another line.<br />
If the array picks up this line,<br />
then is it a pickup line?<br />
[/code]



------------------------------

[B]http://example.com/index.html[/B]
[code=html]<HTML>
<HEAD>
<TITLE>Example Web Page</TITLE>
</HEAD>
<body>

<p>You have reached this web page by typing &quot;example.com&quot;,
&quot;example.net&quot;,
or &quot;example.org&quot; into your web browser.</p>
<p>These domain names are reserved for use in documentation and are not available
for registration. See <a href="http://www.rfc-editor.org/rfc/rfc2606.txt">RFC
2606</a>, Section 3.</p>
</BODY>
</HTML>[/code]

displays as
You have reached this web page by typing "example.com", "example.net", or "example.org" into your web browser.

These domain names are reserved for use in documentation and are not available for registration. See RFC 2606, Section 3.
[/QUOTE]


==============================

[B]using fopen() and fgets() on test.html[/B]
[code=php]<?php
$file = fopen("test.html","r");
echo "$file=".$file."<br/>";
while(! feof($file))
{
echo fgets($file);
}
fclose($file);
?>[/code]

returns:
$file=Resource id #3

[I]Hello World[/I]. Testing testing!

Another day, another line.

If the array picks up this line,

then is it a pickup line?[/QUOTE]


[B]using fopen() and fgets() on example.com[/B]
[code=php]<?php
$file = fopen("http://example.com/index.html","r");
echo "$file=".$file."<br/>";
while(! feof($file))
{
echo fgets($file);
}
fclose($file);
?>[/code]

returns
$file=[/QUOTE]


------------------------------

[B]using file_get_contents() on test.html[/B]
[code=php]<?php
echo file_get_contents("test.html");
?>[/code]

returns
[I]Hello World[/I]. Testing testing!

Another day, another line.

If the array picks up this line,

then is it a pickup line?[/QUOTE]


[B]using file_get_contents() on example.com[/B]
[code=php]<?php
echo file_get_contents("http://example.com/index.html");
?> [/code]

returns

[I]NOTHING[/I]


------------------------------

[B]using fopen() and fpassthru() on test.html[/B]
[code=php]<?php
$file = fopen("test.html","r");
echo fpassthru($file);
fclose($file);
?> [/code]

returns
[I]Hello World[/I]. Testing testing!

Another day, another line.

If the array picks up this line,

then is it a pickup line?

155 [/QUOTE]


[B]using fopen() and fpassthru() on example.com[/B]
[code=php]<?php
$file = fopen("http://example.com/index.html","r");
echo fpassthru($file);
fclose($file);
?>[/code]

returns

[I]NOTHING[/I]


------------------------------

[B]using readfile() on test.html[/B]
[code=php]<?php
echo readfile("test.html");
?> [/code]

returns
Hello World. Testing testing!

Another day, another line.

If the array picks up this line,

then is it a pickup line?

155 [/QUOTE]


[B]using readfile() on example.com[/B]
[code=php]<?php
echo readfile("http://example.com/index.html");
?> [/code]

returns

[I]NOTHING[/I]
Copy linkTweet thisAlerts:
@bokehMay 04.2007 — fopen and file_get_contents both work so what's the problem?
Copy linkTweet thisAlerts:
@brasspenguinsauthorMay 08.2007 — it wont open any urls
Copy linkTweet thisAlerts:
@bokehMay 09.2007 — Well maybe URL wrappers is disabled.
Copy linkTweet thisAlerts:
@brasspenguinsauthorMay 11.2007 — so i need to edit the .ini?
Copy linkTweet thisAlerts:
@bokehMay 11.2007 — Is this your server or a hosted service. If it is the latter you should ask the host.
Copy linkTweet thisAlerts:
@brasspenguinsauthorMay 29.2007 — Sorry about the late response. Thanks for the advice. I'll do that
×

Success!

Help @brasspenguins spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...