Should be a mini-tutorial or a "notice"?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
DaveTheAve
Forum Contributor
Posts: 385
Joined: Tue Oct 03, 2006 2:25 pm
Location: 127.0.0.1
Contact:

Should be a mini-tutorial or a "notice"?

Post by DaveTheAve »

Well PHPDN... not sure if you remember me - it's been a while - but I'm back in action! Wow things have changed... the whole board's design and if I recall correctly... perhaps the forum software as-well...

Enough will the past I was working on a small script for a client (BTW I need help with a ZF project i'm doing for myself as a portfolio piece: viewtopic.php?f=1&t=115985 ) when I found that the script works PERFECTLY on my Kubuntu installation but not the SAME EXACT script on his server.... long story short... His server was NOT sending header via fopen.

Here is how I bypassed the fopen issue with no sending headers:

Code: Select all

@ini_set('user_agent', "Mozilla 4.0\r\nCookie: ".$mycookies."\r\n"); 
I just sent them in the user-agent and exploited a small flaw! Now I can't take credit for this, I found it here: http://core.trac.wordpress.org/ticket/11888. But we should have this information on here for others to know about it sooner and they don't waste hours like i did finding this issue.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Should be a mini-tutorial or a "notice"?

Post by Jonah Bron »

I remember your avatar, and your signature :)

So, to clarify to myself, are you tricking the target of fopen() into thinking that PHP is a browser?
User avatar
DaveTheAve
Forum Contributor
Posts: 385
Joined: Tue Oct 03, 2006 2:25 pm
Location: 127.0.0.1
Contact:

Re: Should be a mini-tutorial or a "notice"?

Post by DaveTheAve »

Yea I needed to stream a file to the user that is only accessible once the user is logged in. Hence the cookie issue... the PHP monster keep eating them. I should spank it. ;).... I would have much prefer using cURL but cURL can't stream.
Post Reply