| | |
Extract everything between <object></object>
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2008
Posts: 33
Reputation:
Solved Threads: 0
Hi all
I am using CURL to reach a page ,now i want to extract this from the page
please help
I am using CURL to reach a page ,now i want to extract this from the page
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="640" height="303.33333333333" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab" id="object701207571">
<param name="autoPlay" value="false" />
<param name="custommode" value="Stage6" />
<param name="src" value="" />
<param name="movieTitle" value="Titanic" />
<param name="bannerEnabled" value="false" />
<param name="previewImage" value="http://stagevu.com/img/thumbnail/oripmqeqzrccbig.jpg" />
<embed type="video/divx" src="" width="640" height="303.33333333333" autoPlay="false" custommode="Stage6" movieTitle="Titanic" bannerEnabled="false" previewImage="http://stagevu.com/img/thumbnail/oripmqeqzrccbig.jpg" pluginspage="http://go.divx.com/plugin/download/" id="embed701207571"></embed>
</object> Well preg match will do the job. Try the following:
php Syntax (Toggle Plain Text)
<? preg_match_all('/\<object(.*)\<\/object\>/is',$page_contents,$tmp); $matches=$tmp[0]; unset($tmp); //display the first one on the page echo $matches[0]; ?>
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
![]() |
Similar Threads
- Extract MS Excel Data embedded in MS Word (Visual Basic 4 / 5 / 6)
- Extract Recipe Data (Python)
- how can i extract data from .xml file? (Visual Basic 4 / 5 / 6)
- getting an object from a given string (Java)
- How to extract a substring from a char* (C++)
- ASP.NET Tutorial: Caching in ASP.NET (ASP.NET)
- save self-defined object in vector problem (C++)
- How to extract user network login name with vbscript? (Visual Basic 4 / 5 / 6)
- gpu, money no object! give us ya view (Monitors, Displays and Video Cards)
Other Threads in the PHP Forum
- Previous Thread: Validating input variables?
- Next Thread: Calling PHP function on Javascript events e.g onchange
| Thread Tools | Search this Thread |
apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date display dynamic echo email error fcc file files folder form forms freelancing function functions google href htaccess html image include incode insert integration ip javascript joomla limit link login mail match menu method mlm mod_rewrite multiple mysql oop pageing pagerank paypal pdf php problem query radio random recursion recursiveloop remote script search server sessions sms smtp soap source space sql strip_tags subversion support! survey syntax system table template tutorial undefined update upload url validator variable video virus web window.onbeforeunload=closeme; youtube






