4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 fopen in php
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
fredmatrack
Junior WebHelper
Junior WebHelper


Joined: 27 Feb 2002
Posts: 24
Location: Hoboken (Antwerpen, Belgium)

PostPosted: Mon Apr 29, 2002 4:12 pm (15 years, 6 months ago) Reply with QuoteBack to Top

I used the following in my phpscript:

Code:
$fp = fopen ("http://postxxxxx:????@piustien.dyndns.org:8011/Settings/USERS/geert.html", "r") or die ("No connection");


This doesn't work on my webspace from f2s. On another server it works. Why???
OfflineView User's ProfileFind all posts by fredmatrackSend Personal MessageSend emailVisit Poster's WebsiteMSN MessengerICQ Number
fredmatrack
Junior WebHelper
Junior WebHelper


Joined: 27 Feb 2002
Posts: 24
Location: Hoboken (Antwerpen, Belgium)

PostPosted: Mon Apr 29, 2002 5:19 pm (15 years, 6 months ago) Reply with QuoteBack to Top

But on my other server this works. Only on the f2s server it doesn't.
OfflineView User's ProfileFind all posts by fredmatrackSend Personal MessageSend emailVisit Poster's WebsiteMSN MessengerICQ Number
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Apr 29, 2002 5:31 pm (15 years, 6 months ago) Reply with QuoteBack to Top

It's because of F2S' firewall: you can only open files on the F2S network and certain "allowed" servers. Try asking F2S to add the server you want to the list. Question

Andrew: I don't think that's true.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Mon Apr 29, 2002 5:42 pm (15 years, 6 months ago) Reply with QuoteBack to Top

Its definitely an f2s thing.

My f2s account fails to open a remote file on cyberwings, but it works vice versa.
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
fredmatrack
Junior WebHelper
Junior WebHelper


Joined: 27 Feb 2002
Posts: 24
Location: Hoboken (Antwerpen, Belgium)

PostPosted: Mon Apr 29, 2002 5:44 pm (15 years, 6 months ago) Reply with QuoteBack to Top

Thanks,
i will contact the f2s staff.
OfflineView User's ProfileFind all posts by fredmatrackSend Personal MessageSend emailVisit Poster's WebsiteMSN MessengerICQ Number
php4ever
Junior WebHelper
Junior WebHelper


Joined: 10 Oct 2002
Posts: 49

PostPosted: Tue Apr 30, 2002 12:28 am (15 years, 6 months ago) Reply with QuoteBack to Top

Yes, you may use fopen with a non-local url at f2s. I know b/c I have that going at the former freespace I had at f2s and just now I tried it on my paid f2s space and it worked there, too. Very Happy

Just a couple of pts. about fopen:

1. you must use it to only read a non-local url
2. be very, very careful how you code in case fopen should fail or you may get a wierd error.
3. I've seen fopen perform very badly on a busy US govt server. fsockopen is prob. a better way to go b/c it gives you more control.

I suggest that you may wish to read the notes section at:
http://www.php.net/manual/en/function.fopen.php -

Here's the way I'ved coded and it worked:

$fd2 = @fopen($urle, "r");
if (!$fd2) return 0;

And, here are the 2 working urls at f2s:

http://www.preservestaffnow.org/exp/myfeed.php
http://www.preservestaffnow.f2s.com/myfeed.php

Perhaps f2s may have changed s.thing recently b/c I checked just now with the phpinfo() and saw that the fopen info at both of my sites at f2s are identical, namely all "1"s.

-- php4ever
OfflineView User's ProfileFind all posts by php4everSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.051038 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme