943,807 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 756
  • PHP RSS
Apr 14th, 2009
0

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

Expand Post »
<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...
Reputation Points: 10
Solved Threads: 0
Light Poster
jyotiu is offline Offline
33 posts
since Sep 2008
Apr 14th, 2009
0

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

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.
Reputation Points: 52
Solved Threads: 23
Posting Whiz in Training
martin5211 is offline Offline
271 posts
since Aug 2007
Apr 15th, 2009
0

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

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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
chinmayu is offline Offline
11 posts
since Nov 2008
Apr 15th, 2009
0

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

No problem, I could have continued the development anyway... regex for scrapping data and manipulating arrays can be a pain sometimes...
Reputation Points: 52
Solved Threads: 23
Posting Whiz in Training
martin5211 is offline Offline
271 posts
since Aug 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Updating MySQL ... tricky
Next Thread in PHP Forum Timeline: Display image from database - when stored as a html link





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC