NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP - getting info from another website.

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
4 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 05-06-2006, 11:09 AM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Apr 2006
Location: Central PA
Posts: 101
NonProphet is on a distinguished road
 



PHP - getting info from another website.


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.
NonProphet is offline  
Old 05-06-2006, 11:34 AM   #2 (permalink)
Tech Support
Join Date: Mar 2005
Posts: 4,944
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
You could use file_get_contents() and preg_match().
Eric is offline  
Old 05-06-2006, 11:38 AM   #3 (permalink)
Senior Member
 
nasaboy007's Avatar
Join Date: Jul 2005
Location: NJ
Posts: 1,219
nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of
 



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 - NAME OF PERSON, AGE  years old, SEX, , STATE, COUNTRY, QUOTE" />
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">DISPLAY NAME</span>
other stuff:
Code:
<td class="text" width="193" bgcolor="#ffffff" height="75" align="left">"QUOTE"<br>
			    <br>
			    (fe)Male <!-- just get it to match *male -->
			    <br>
			    AGE years old
			    <br>
			    STATE
			    <br>
			    COUNTRY

????: NamePros.com http://www.namepros.com/programming/194565-php-getting-info-from-another-website.html

i suggest u just use the meta tag description to get all ur values and eval the argument
nasaboy007 is offline  
Old 05-06-2006, 11:55 AM THREAD STARTER               #4 (permalink)
NamePros Member
Join Date: Apr 2006
Location: Central PA
Posts: 101
NonProphet is on a distinguished road
 



Thanks I appreciate it I'll look into those functions later tonight.
NonProphet is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:13 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger