NameSilo

PHP - Getting info from another website.

Spacemail by SpaceshipSpacemail by Spaceship
Watch

NonProphet

Established Member
Impact
2
Hey, I've been coding PHP for awhile now and I'm currently developing a MySpace friend train. Everything is up and running smoothly but I ran into an issue that I don't know how to do, and I don't know where I should begin to look (Google didn't help to much). I want to get their Name, Age, Picture, and Location off the myspace profile. I've seen other trains do this just by asking for their Friend ID. I guess they just open up the persons profile and parse out what they are looking for. If its done another way, I'd like to know how, but if they do it by parsing out HTML, I'd also like to know where to look to learn how to do that. Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
1
•••
guess u wud have to use regexp matches.

get the source of the page of the person (html) and find these using reg exp

Code:
<meta name="description" content="MySpace Profile - [COLOR=Red]NAME OF PERSON[/COLOR], [COLOR=Red]AGE [/COLOR] years old, [COLOR=Red]SEX[/COLOR], , [COLOR=Red]STATE[/COLOR], [COLOR=Red]COUNTRY[/COLOR], [COLOR=Red]QUOTE[/COLOR]" />

ive marked all the words that change according to profile in red above.


or if u want specifics, here r some:

display name:
Code:
<span class="nametext">[COLOR=Red]DISPLAY NAME[/COLOR]</span>

other stuff:
Code:
<td class="text" width="193" bgcolor="#ffffff" height="75" align="left">"[COLOR=Red]QUOTE[/COLOR]"<br>
			    <br>
			    (fe)Male <!-- just get it to match *male -->
			    <br>
			    [COLOR=Red]AGE[/COLOR] years old
			    <br>
			    [COLOR=Red]STATE[/COLOR]
			    <br>
			    [COLOR=Red]COUNTRY[/COLOR]



i suggest u just use the meta tag description to get all ur values and eval the argument
 
1
•••
Thanks I appreciate it :) I'll look into those functions later tonight.
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back