Jump to content

fopen and fread help


sgb162

Recommended Posts

Basically, I wanted to read the top line from this feed: [a href=\"http://ws.audioscrobbler.com/1.0/user/Sgb1622/recenttracks.txt\" target=\"_blank\"]http://ws.audioscrobbler.com/1.0/user/Sgb1...ecenttracks.txt[/a]

and output it in a one-line text format. I wrote this code to attempt it:
[a href=\"http://code.pastebin.com/602914\" target=\"_blank\"]http://code.pastebin.com/602914[/a] (Sorry about putting it on pastebin, but it WOULD NOT SUBMIT to this post at all.)

It worked. To an extent. It worked on apache, at least. When uploaded, it gave me this:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
Warning: fopen(): URL file-access is disabled in the server configuration in /home/.denali/sgb162/sgb162.com/reader.php on line 4

Warning: fopen(http://ws.audioscrobbler.com/1.0/user/Sgb1622/recenttracks.txt): failed to open stream: no suitable wrapper could be found in /home/.denali/sgb162/sgb162.com/reader.php on line 4

Warning: fread(): supplied argument is not a valid stream resource in /home/.denali/sgb162/sgb162.com/reader.php on line 5

Warning: fclose(): supplied argument is not a valid stream resource in /home/.denali/sgb162/sgb162.com/reader.php on line 6[/quote]

I'm assuming that means they don't want me opening & reading files from other servers or something. So I guess I'd have to use something else. Basically, what I need is an idea and a concept or something. Would sockets be the way to go? I really don't know how to use sockets. Reading up on them on php.net confused me. <_< Do you know of a better way to do this or to fix it? Any help appreciated, thanks.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.