| | |
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 binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external fcc file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing pagerank paypal pdf php phpmysql play problem query question radio random recursion remote root script search select server sessions sms soap source space sql support! syntax system table template tutorial update upload url validator variable video web youtube






