Extract video names and links along with ther part no. from a given string

Thread Solved

Join Date: Sep 2008
Posts: 33
Reputation: jyotiu is an unknown quantity at this point 
Solved Threads: 0
jyotiu jyotiu is offline Offline
Light Poster

Extract video names and links along with ther part no. from a given string

 
0
  #1
Apr 14th, 2009
<div style="float: left; font-variant: small-caps;">movie link (zshare) :</div><div style="float: left; margin-left: 10px;">Link <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58502819262e0ecc/">1</a> </div><div style="float: right;"><a href="javascript:DeadLink('http://www.movies-on-demand.tv/report.php?id=2845')"><img title="Report Dead Link" src="http://img.movies-on-demand.tv/templates/mod/images/broken.gif"></a></div></div><div style="margin-top: 2px; width: 550px; height: 20px; background-color: rgb(255, 255, 255); font-size: 13px;"><div style="float: left; font-variant: small-caps;">movie link (zshare) :</div><div style="float: left; margin-left: 10px;">Link <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58600439d353044a/">1</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58600547e014d9d5/">2</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58600619c7dc7adc/">3</a> </div><div style="float: right;"><a href="javascript:DeadLink('http://www.movies-on-demand.tv/report.php?id=2845')"><img title="Report Dead Link" src="http://img.movies-on-demand.tv/templates/mod/images/broken.gif"></a></div></div><div style="margin-top: 2px; width: 550px; height: 20px; background-color: rgb(233, 233, 233); font-size: 13px;"><div style="float: left; font-variant: small-caps;">movie link (supernovatube) :</div><div style="float: left; margin-left: 10px;">Link <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.supernovatube.com/divx.php?viewkey=9c9fad730126e551a20c">1</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.supernovatube.com/divx.php?viewkey=a1f399ad827192f71490">2</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.supernovatube.com/divx.php?viewkey=f7ccdf44a27a41005391">3</a> </div><div style="float: right;"><a href="javascript:DeadLink('http://www.movies-on-demand.tv/report.php?id=2845')"><img title="Report Dead Link" src="http://img.movies-on-demand.tv/templates/mod/images/broken.gif"></a></div></div>

I want to extract following from above:
'Zshare' than href of the 'Link' and 1 as part no. , will assign group =1
'Zshare' than href of the 'Link' and 1 as part no.(here 3 hrefs will be extracted and each will have respective part no.) , will assign group = 2(since 'Zshare is two times)
'supernovatube' than href of the 'Link' and 1 as part no.(here 3 hrefs will be extracted and each will have respective part no.) , will assign group = 0
i will insert these values in a table after extraction with following structure: video_sitename,link_url,partno,groupid

Please help...
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 189
Reputation: martin5211 is an unknown quantity at this point 
Solved Threads: 14
martin5211 martin5211 is offline Offline
Junior Poster

Re: Extract video names and links along with ther part no. from a given string

 
0
  #2
Apr 14th, 2009
I wrote a solution on your previous thread (http://www.daniweb.com/forums/thread186448.html)... this is almost a duplicated one. Why not to continue to develop your issue into your previous thread ?
Last edited by martin5211; Apr 14th, 2009 at 12:22 pm.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 11
Reputation: chinmayu is an unknown quantity at this point 
Solved Threads: 1
chinmayu chinmayu is offline Offline
Newbie Poster

Re: Extract video names and links along with ther part no. from a given string

 
0
  #3
Apr 15th, 2009
Hi martin5211
thanks for your replies... i don't know i was very desperate for solution anyways i have done it myself thanks for the reply
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 189
Reputation: martin5211 is an unknown quantity at this point 
Solved Threads: 14
martin5211 martin5211 is offline Offline
Junior Poster

Re: Extract video names and links along with ther part no. from a given string

 
0
  #4
Apr 15th, 2009
No problem, I could have continued the development anyway... regex for scrapping data and manipulating arrays can be a pain sometimes...
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC