• Log in or sign up for an account here: https://www.sythe.org/login

I need help, shouldn't be too hard

Pyro

Guru
Joined
Jun 14, 2005
Sythe Gold
0
Messages
1,145
Age
36
Anyone who knows me, knows that I am not just a lazy leecher. I have done my best to figure this out on my own. I have read quite a few tutorials, and have written alot of code. But, I can't figure this out. I am trying to write something to enumerate the list of unread messages on myspace, and get a link to each of them.

Note: This all assumes that the user is already logged in, and the page has been fetched. As if the HTML source code to the Inbox page has already been downloaded, and the PHP code is parsing the downloaded file.

With the following code, I can find out how many unread messages there are. The problem is that I don't know how to match the URL to the message, with the "Unread" text, to make sure that it doesn't get messages that have already been read. I could do this in VB, but I need to write in in a web probramming language, and PHP is the only one I'm any good at.

Code:
function str_cnt($find,$in){
	$search_for=$find." ";
	$count==0;
	$string=substr( strstr( $find, $in));
	while($string){
		$string=substr( strstr( $string, $in));
		$count= count + 1;
	}
	return $count;
} 

function message_count(string $url)
{
	$contents = file_get_contents($url);
	$ret_val=0;
	$count = str_cnt("Unread</span>",$contents);
	if ($count > 0) {
		$ret_val = $count;
	}
	return $ret_val;
}
 
I know php, but I don't see any errors in the code.

I think it's the fact that myspace has their own special code that generates random urls so that they can't be fetched like the way you're trying to. And even if you did manage to get the url, it wouldn't work any more because the urls expire within nearly a minute or so.
 
1) I know there are no errors in my code, I never said there were. That code is just to help.

2) Their own special code to get the URLs? What the fuck...No they don't, that doesn't even make any sense...The URLS aren't even randomized...And what do you mean by "The way I'm trying to"? The way I am trying to, is by getting them from the HTML source from the Inbox page, just like your browser does...You are implying that firefox and IE cannot check your myspace messages...Think about it

3) They don't expire after a minute...They don't expire period...Go check your messages, write down one of your message URLS. Then go to school or whatever, come back, check it, and it will be exactly the same...

I appreciate you trying to help, but please don't act like you know things that you don't.
 
Actually, cp_ is correct. Try finding a code for a song off of www.imeem.com its a media website for people to find/upload songs and create playlists. It used to work for MySpace but like many other sites, MySpace is slowly removing possibilities for linking to certain shit. Paste a random song on imeem on your profile, update it, then go check it out. If it manages to work, refresh your page or check again in a few minutes, I guarentee it will turn your playlist to a blank square and when you right click it, it will say "Movie Not Loaded". MySpace also doesn't allow certain coding. Most of HTML and CSS is the only shit you'll probably get to work on MySpace. I'm not very familiar with coding, but I am extremely familiar with MySpace, sorry to disappoint you Pyro. :(


When/If you do this with the imeem.com thing I suggested notice the part of the code will say something like http://media.imeem.com blah blah blah
After you check out the code again a minute or so later notice the part of the code will say something like
http://media...blah blah blah
Thus confirming cp_'s statement.
 
Also, you claim to be trying to get the unread mail link. Myspace uses these things called 'tokens'. You'll notice them in some of the urls you visit, and possible your cookies. These tokens are encrypted information, and myspace uses their own formula to decode these tokens that hold the data for each account.

In the urls for the unread mail, the token is there, and you won't be able to generate it on your own, decode it, or use it anywhere else. Each token lasts about 10~15 minutes before becoming void.

You could also use regex to grab the urls, assuming that you know regex.
 
I'm sorry if you get offended, but that's a little noobish, what you're tring to do.

First of all, $id holds no values, and I think you were trying to make $id = the values of the 'tokens' or whatever. 'Pyro' hasn't found a way to get the tokens yet, so it what you are trying to do = phail.

You're also using $id variable in a string without concatenating it properly, which would link to checkmail.php?id=$id, and it would appear like that in your browser like that. You should have done something like echo "<a href=\"/checkmail.php?id=".$id."\">Checkmail.php</a>";
or something similar.
 
Runescape Gamblingrunescape gambling
Back
Top