English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi, I'm trying to develop a script that will, given the friend id from a form input, get the html of the persons myspace profile, and serch through it to get their default picture, and display name. What could I use to do this? And if it's simple enough, could someone develop this for me?

Thanks,
Tyler

2006-11-13 09:54:48 · 2 answers · asked by thety2 1 in Computers & Internet Programming & Design

2 answers

Use the CURL library to GET their profile page ( http://www.myspace.com/username ). This will give you a string containing the page as sent by MySpace's web server.

Here's where it gets tricky -- myspace's HTML doesn't include much "semantic" markup. So, you can't easily pick out pieces of information. But, you can look for certain signs that give a clue as to what's coming.

Search for the following and note the position of the >:



Now, search for the closing
tag and note the position of the <. The user's display name is the text between those two positions.

From that point, search for the first occurrence of "DefaultImage". This will be inside the "id" attribute of an "a" (anchor) tag. Now, search for the
Note that you will have to change what you're looking for if MySpace ever changes how their pages are formatted. But, you have that problem with pretty much every screen scraping program like this.

2006-11-13 10:13:30 · answer #1 · answered by watsonc64 3 · 0 0

think of of something you the two like and make it sound cool. Like in case you the two like stickers, say StickerMania. Or something like that. dissimilar my pals have somewhat humorous joking names like Paul the Sailor or something like that. think of of something quirky and funky. yet be certain you the two agree on it!! Lol Oh! And please please please do not combination your names collectively and think of it seems humorous. It dosent paintings, have faith me!! happy Naming ;)

2016-10-17 05:56:01 · answer #2 · answered by chowning 4 · 0 0

fedest.com, questions and answers