PDA

View Full Version : Interesting idea - php redirects via Myspace


webtracker
December 13th, 2007, 12:37 PM
Has anyone ever seen this done?

I came across a Myspace comment site that's implemented a hidden "image" below each comment.

The hidden image doesn't appear when someone pastes the comment to their/or to a friends profile. All you see is the comment.

The site chooses when you activate the hidden image and it then appears instantly across the thousands of pages where the comments and code are in place. The image could take any form they want it to take.

The image link points to a php script on the sites server. This particular site, as an example, is redirecting all that traffic via php script to another site; one where he is using an affiliate ID.

Clever? I never thought about doing this myself, but it has great potential.

Code:
<a href=http://www.somesite.com/>
<img src=http://somesite.com/somepicture.gif>
</a>
<br>
<a href="http://somesite.com/somescript.php">
<img src="http://somesite.com/hiddenimage.jpg">
</a>

rescreatu
December 13th, 2007, 12:48 PM
No, does it actually rdirect though?

marshall_26
December 13th, 2007, 12:49 PM
They can't be redirecting the user from the profile :) only java would do this "which isn't allowed". PHP is run server side so I don't imagine an external .php script could pull this off ...

kensimon
December 13th, 2007, 12:51 PM
yeah it's a clever trick, i've seen people use that technique a couple of times.

webtracker
December 13th, 2007, 01:45 PM
No, does it actually rdirect though?

Yes it does.

site A >> site B >> site C

Myspace (A) user clicks link >>> user is sent to the comment sites server (B) >> user is redirected to affiliate site (C)

It may be a 302 redirect or something like that. I'm not a programmer :)

Google search "Myspace, Hi5, Friendster, Hi5 and Blog Comment Graphics" to see it in action.

webtracker
December 13th, 2007, 01:46 PM
They can't be redirecting the user from the profile :) only java would do this "which isn't allowed". PHP is run server side so I don't imagine an external .php script could pull this off ...

It happens on server side. Maybe via htaccess; I'm not sure.

marshall_26
December 13th, 2007, 02:10 PM
It happens on server side. Maybe via htaccess; I'm not sure.

Yeah I thought you meant an actual redirect from the myspace page :)

don't need php for that, .htaccess will do it too ;)

deep
December 13th, 2007, 02:55 PM
yeah this isnt very hard to do, just simple modding of .htaccess
you can make it so it shows a diff pic for myspace/friendster but use the same url for that pic. theres many ways to do it but htaccess would be the best and fastest i think.

lyzyrdgyzyrd
December 13th, 2007, 03:57 PM
I use similar method for image redirect to make seasonal/holiday changes to corner tags. I'm gonna cut it out though, due to server load caused by so many damned simultaneous connections.

Jazzylee77
December 13th, 2007, 04:26 PM
I'm afraid my .htaccess tricks are whats causing one of my servers to slow. There are 3 images that are redirected for each day of the year. So there are 3 fairly lengthy modrewrite entries in that subdomain, plus drupal on the main domain has a lengthy .htaccess that I've added about 400 redirects to. Sometimes, I think I spend too much time trying to be clever, when I should just write articles and build links...

But I'm not sure how much a load .htaccess code is to a site. It's my impression that the server needs to run through all the .htaccess with each page load? How much is too much and are some directives more server intensive than others? I should research that myself...I think a glib forum answer is what sent me down that path to begin with.

Maybe there is better way? I suppose a php-mysql solution would be faster, since it wouldn't add code bloat to every page load. And I've made a little progress with php/mysql since i sorta wrote a nifty little content insertion script.

pardon my rambling, can't remember the subject. I'm all hopped up on cough syrup and herbal tea.

marshall_26
December 13th, 2007, 04:43 PM
Maybe there is better way? I suppose a php-mysql solution would be faster, since it wouldn't add code bloat to every page load.


Then you add database queries which IMHO takes more time and resource, I think .htaccess is the most efficient way of doing it. I could be wrong though :)

Jazzylee77
December 13th, 2007, 05:03 PM
Then you add database queries which IMHO takes more time and resource, I think .htaccess is the most efficient way of doing it. I could be wrong though :)

I'm operating on perhaps false assumptions; But maybe if the database is only queried when those images are served either offsite or on , instead of having all that .htaccess code to run through with each page load of the site...a few variables to consider. how often is the image hit etc.

If my asumptions are close, I'd say the php solution would have to be about 12 times slower (good God I just used some algebra) than the .htaccess before it would decrease
overall server speed. Maybe it is... need more data

I'm wondering about a script that would physically write a new image to the given file name each day. After that it's just loading that image till the next day.

I gotta quit looking at this..its making me dizzy for some reason!

marshall_26
December 13th, 2007, 05:35 PM
I'm wondering about a script that would physically write a new image to the given file name each day. After that it's just loading that image till the next day.


That's a good idea :)

mawt
December 13th, 2007, 06:12 PM
I remember i always used to see <img src="http://BLAHBLAH.com/BLAH.php"> for a image...

Jazzylee77
December 13th, 2007, 06:42 PM
I remember i always used to see <img src="http://BLAHBLAH.com/BLAH.php"> for a image...

yeah then it would be a simple script to pull the image according to date, time, day of week or replacing a variable like an affiliate url or whatever. But does that work on most sites? Allowing a php image url?

Jazzylee77
December 13th, 2007, 06:47 PM
got me thinking cleverly again...could be trouble...

combine results from weather rss feeds to set a weather conditions variable, then have it display randomly from the correct category set of weather related glitters, cloudy, rainy, thunderstorms, sunny etc... would be a cool thing to paste on your page huh?

Ajay
December 13th, 2007, 07:51 PM
what would be the point :) there are already a few flash widgets that show the weather, according to area code.

got me thinking cleverly again...could be trouble...

combine results from weather rss feeds to set a weather conditions variable, then have it display randomly from the correct category set of weather related glitters, cloudy, rainy, thunderstorms, sunny etc... would be a cool thing to paste on your page huh?

omen
December 13th, 2007, 08:13 PM
got me thinking cleverly again...could be trouble...

combine results from weather rss feeds to set a weather conditions variable, then have it display randomly from the correct category set of weather related glitters, cloudy, rainy, thunderstorms, sunny etc... would be a cool thing to paste on your page huh?

Not really huh.

There are much better widgets freely available that own a crappy glitter graphic any day.

Jazzylee77
December 13th, 2007, 08:41 PM
Not really huh.

There are much better widgets freely available that own a crappy glitter graphic any day.
Yeah, but A lot of myspacers don't know that and would pick it up while browsing graphics. And if they can stick it on their page just like any other pic they would use it. Plus, there is no accounting for taste... You just know there are those that would go for the angel weather glitters, or the NBA weather glitters, emo weather glitters, or anything that makes them look different. Gosh who wouldn't want their own blue glitter bunny telling them whether it was going to rain.

And there is no need to limit the concept to weather. League events, upcoming races, fashion shows. Maybe I just like the idea of using a simple image link, since I'm not up to writing widgets yet.

I cook the same way. I look at whats in the cupboard and think about what I already know, then throw a meal together. But, that last peach cobbler could have been better...

But I'm just thinking out loud. Don't have much widget experience and you guys are probably right.

omen
December 13th, 2007, 08:55 PM
Not really huh.

There are much better widgets freely available that own a crappy glitter graphic any day.

I agree with Jazzylee omen. I think it's a great idea. You suck.

omen
December 13th, 2007, 08:56 PM
I agree with Jazzylee omen. I think it's a great idea. You suck.

Fight me *****.

Jazzylee77
December 13th, 2007, 09:37 PM
I agree with Jazzylee omen. I think it's a great idea. You suck.

Funny. :) I don't mind seeing things contested, especially when there is a bit of reasoning to it.

In fact I was just thinking of different styles of people you want on a team. Dreamers, rabbits, experts, newbies, robots, planners, beancounters... all ready to test the water and adjust the course.

Well back to the role of grunt for me. I'm a tagging machine