/    Sign up×
Community /Pin to ProfileBookmark

Dear all,

I have a basic script for file sharing and it works well on my computer, but I want to introduce it to a network. At this stage, it can only access files in it’s root folder, which I am happy with, but I want to know if there is a way to make it access other people’s nominated folders without them having to host the script from the file that they want to share from. This is the code:

<html>
<body>
<?php
if (!($f=fopen(“$_POST[filename]”,”r”)))
exit(“Unable to open file.”);
while (!feof($f))
{
$x=fgetc($f);
echo $x;
}
fclose($f);
?>
</body>
</html>

NB:There is no problem with the script, but i want to know if there is an easier way for new users to join than having to host their own PHP page, as none of the computers on the network support PHP.

PS-Is there a free domain site that supports PHP?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@ShrineDesignsNov 20.2004 — [URL=http://www.php.net/manual/en/ref.network.php]PHP Network Functions[/URL]

finding a free php host is difficult
×

Success!

Help @Paddy_Notemaker 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.18,
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,
)...