Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

MySpace Pepper

barkerja
Third-Party Pepper Developer
Posted on Aug 29, '07 at 11:44 pm

@Matthew: That’s the workaround for MySpace, is to make it think it is an image file. That’s what the .htaccess is for.

The DB prefix has nothing to do with this although there is something in the API that I did not know about that makes things a lot easier with the DB and will be included in the next release this weekend and should fix a lot of peoples problems.

Matthew
Minted
Posted on Aug 31, '07 at 09:57 am

Thanks. I’ll give the update a shot when you post it. This could actually be used to monitor any social networking site (where stats are hard to get), not just MySpace.

barkerja
Third-Party Pepper Developer
Posted on Sep 03, '07 at 07:40 am

Just released new version of the myspace pepper, should fix a lot of problems for people.

Removed the db.inc and geo.inc files, made the .htaccess more compliant and made use of the $Manifest DB abstraction in the API.

Grab it from http://mysur.ws/6

barkerja
Third-Party Pepper Developer
Posted on Sep 03, '07 at 01:18 pm

If you use this pepper, please let me know how it works out for you. Also let me know if there is anything you’d like added. I’m always open for ideas.

Ugly .htaccess code which is not even necessary.

Unless you’re intending to change all your .png files on the server and run them as php, a better way to do it is just to send the correct mime type to the browser in the the first place.

In your php:

header('Content-type: image/png'); file_put_contents('register.png');

Nothing special to call the tracker:

<img src="http://server/trackthis.php">

MySpace (and subsequently your browser/server) don’t care what file extension your “invisible” image is, only that they “see” it as a valid image (which could really be a php script).

oops… replace file_put_contents with readfile.

sorry, end of day here… (and too many php functions to keep track of)…

You could also do:

header("Location: http://server/path/to/image.png")

and force the browser to fetch the image but that’s a little uglier.

barkerja
Third-Party Pepper Developer
Posted on Sep 03, '07 at 08:31 pm

Last time I tried to (img src=”asdf.php”) in MySpace it would not work, even if the file was being treated as a valid image. MySpace checks the extension.

And the .htaccess only changes the filetype for that directory. It wouldn’t change for the entire server or parent directories unless it was changed in the main httpd.conf or placed in your parent directory.

hmm…. they must have recently changed things because that worked when I did it awhile back.

just did some playing around… a slightly sneekier way is if you embed images via css:

<style type="text/css">
body { background-image:url(http://server/myspace.php); }
</style>

barkerja
Third-Party Pepper Developer
Posted on Sep 04, '07 at 07:27 pm

Didn’t think of that and haven’t tried it, might work. I’ll try it out later.

Matthew
Minted
Posted on Sep 05, '07 at 10:42 am

@barkerja: Still no luck. Everything seems to be installed correctly, but no hits are showing up. I thought it was my cookie setting, so I asked a friend to hit my page from another state. No luck. Any ideas?

barkerja
Third-Party Pepper Developer
Posted on Sep 05, '07 at 07:44 pm

@Matthew, do you have IM?

Matthew
Minted
Posted on Sep 05, '07 at 10:38 pm

google talk: clappm

barkerja
Third-Party Pepper Developer
Posted on Sep 06, '07 at 12:58 am

Hrmm, didn’t find you.

barkerja
Third-Party Pepper Developer
Posted on Sep 06, '07 at 09:34 pm

If your host runs PHP as a CGI and not a module, the .htaccess file included most likely will not work. To hopefully remedy the problem, try:

For PHP 4…

AddHandler php-cgi .png

For PHP 5…

AddHandler php5-cgi .png

I’m going to try some other methods that will make things more universal.

Matthew
Minted
Posted on Sep 09, '07 at 12:03 pm

@barkerja, adding the AddHandler worked for me. I’m on DreamHost in case anyone else is, too. They do run PHP as a CGI.

Thanks!

Hey, I just wanted to comment that this newest version is really nice. I’m happy that you took-out the .inc files for security and made it into a ‘proper’ Pepper.

I also wanted to note that the PHP-CGI AddHandler method above works for me as well.

You might wish to include that in the readme.txt as an option for those users who have hosts running PHP as CGI.

barkerja
Third-Party Pepper Developer
Posted on Sep 13, '07 at 02:42 am

Hey guys, the server that host’s the download for the link that is in this forum is going to be down until tomorrow evening.

Changing servers with (MT) and they’re having to provision an entire new server for me and I can’t stay up tonight to reset everything up.

You can however continue to download the new version from the peppermill here. (Which you should do anyways!) :P

Look for a new release this weekend with possibly some new features. Thanks guys!

rmedek
Minted
Posted on Sep 15, '07 at 11:06 am

I gave this Pepper a test run but it’s just not working. I’m assuming it’s how the .png is handled, because if I change the extension to .php and visit the file directly I get a hit. The image code is in place on the MySpace page, but visiting the image directly (as a .png) forces a download.

I’m not running PHP as a CGI and I’ve got the .htaccess in place, so I’m not sure where things are going wrong.

barkerja
Third-Party Pepper Developer
Posted on Sep 15, '07 at 10:14 pm

remedek, who is your host?

barkerja
Third-Party Pepper Developer
Posted on Sep 16, '07 at 03:58 am

At this point I have basically worked out what kinks in the script that I can, aside from the small issues with parsing the .png file that some people will have (which I will directly help with).

I have ran out of ideas where to take this now. Any input from you guys with what you would like to see/have would be great!

rmedek
Minted
Posted on Sep 17, '07 at 10:22 pm

@barkerja: I’m on a DV at MediaTemple. Thanks for jumping in here. :)

barkerja
Third-Party Pepper Developer
Posted on Sep 18, '07 at 07:03 pm

Okay, do you have the default setup MT provides you with? (Plesk, etc.)

Or do you have a custom setup? And by that I mean you installed Apache, PHP yourself.

rmedek
Minted
Posted on Sep 18, '07 at 11:08 pm

No, I’m on the default setup. But I found the answer on MT’s Knowledge Base: http://kb.mediatemple.net/article.php?id=145

Essentially, a slightly different .htaccess rule will get it working:

AddHandler php-script .png

barkerja
Third-Party Pepper Developer
Posted on Sep 19, '07 at 03:03 am

Funny, that’s what I was about to reply with. Okay, in the next release I’m going to have to include these different .htaccess’ in a readme or something.

So far, we’re to 4-5 variations.

You must be logged in to reply. Login above or create an account