Search found 10 matches

by Parrot
Sun Jul 19, 2015 3:38 pm
Forum: PHP coding => General
Topic: Help With Headers
Replies: 1
Views: 327

Help With Headers

I've got this list of mp3 files, and certain ones are only accessible to certain users. I've got a script to handle sending them the files, and it works well enough. This is the part that generates the headers and sends the file: header('Content-Description: File Transfer'); header("Content-Type: " ...
by Parrot
Wed Jun 05, 2013 10:53 pm
Forum: PHP coding => General
Topic: Cannot login as specific page
Replies: 4
Views: 1925

Re: Cannot login as specific page

I'm not angry with you.

What you're showing me here is the page source for the main frame. Could you show me the page source for the login frame?
by Parrot
Wed Jun 05, 2013 9:10 pm
Forum: PHP coding => General
Topic: Incompatible with Apple Devices
Replies: 8
Views: 1525

Re: Incompatible with Apple Devices

johnj wrote:Yes, you can try audio/mpeg (not mpeg3)
Why not mpeg3?
by Parrot
Wed Jun 05, 2013 9:05 pm
Forum: PHP coding => General
Topic: Incompatible with Apple Devices
Replies: 8
Views: 1525

Re: Incompatible with Apple Devices

johnj wrote:check if application/mp3 will work.
Wouldn't it more properly be audio/mpeg3?
by Parrot
Wed Jun 05, 2013 8:42 pm
Forum: PHP coding => General
Topic: Cannot login as specific page
Replies: 4
Views: 1925

Re: Cannot login as specific page

I need to see the page source for the page with your login form, not the "object not found" page.
by Parrot
Wed Jun 05, 2013 8:32 pm
Forum: PHP coding => General
Topic: Incompatible with Apple Devices
Replies: 8
Views: 1525

Re: Incompatible with Apple Devices

johnj wrote:what is the value for content type, i mean for $mm_type?
application/octet-stream
by Parrot
Wed Jun 05, 2013 7:58 pm
Forum: PHP coding => General
Topic: Cannot login as specific page
Replies: 4
Views: 1925

Re: Cannot login as specific page

The way you've got this login system set up seems a bit strange to me, I'm having trouble understanding how you're trying to work this. Apparently you've already got they're username and you're asking them to submit a form to determine where they go from here? In your browser when it's displaying th...
by Parrot
Wed Jun 05, 2013 5:51 pm
Forum: PHP coding => General
Topic: Incompatible with Apple Devices
Replies: 8
Views: 1525

Incompatible with Apple Devices

I've set up code to allow users to purchase mp3 files. I keep the files in a non web-accessible directory and use a script that verifies that the user is logged in and has purchased the file before it lets them download it. Once the user has been validated it outputs the header specifying a file tra...
by Parrot
Sun Mar 10, 2013 3:20 pm
Forum: PHP coding => General
Topic: Using & as a comparison operator??
Replies: 2
Views: 1069

Using & as a comparison operator??

I came across this code that kind of confused me: if ($strength & 1) I've never heard of using & as a comparison operator. I've looked up comparison operators in the PHP manual and it doesn't list it as one. But apparently this code runs perfectly well. What is it doing? What's the purpose of using ...
by Parrot
Mon Oct 01, 2012 10:22 pm
Forum: PHP coding => General
Topic: Functions beginning with @
Replies: 1
Views: 783

Functions beginning with @

I've run across some PHP code that is written in a way I've never seen before. Some of the functions are preceded by @, for example:

$fp=@fsockopen($host,80,$errno,$errstr,10);

What does it mean to write it that way?