TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 05-24-2009, 02:56 PM   #1 (permalink)
The Visitor
 
Join Date: May 2009
Posts: 2
Thanks: 0
Stahlblau is on a distinguished road
Help Replacing dynamically generated content

Hi.

There are some embedded videos. On a certain template file i'd like to display the videos in a different size. 300x225 -> 600x400

Here's an example where the changes have to be done:

PHP Code:
<div class="entry"

<
span class="vvqbox vvqvimeo" style="width:300px;height:225px;"><span id="vvq-35-vimeo-1"><ahref="http://www.vimeo.com/3846698">http://www.vimeo.com/3846698</a></span></span> 

<script type="text/javascript"
    
swfobject.embedSWF("http://www.vimeo.com/moogaloop.swf""vvq-35-vimeo-1""300""225""9"vvqexpressinstall, { "wmode""opaque""allowfullscreen""true""server""www.vimeo.com""clip_id""3846698""show_portrait""0""show_title""0""show_byline""0""fullscreen""1""color""FFFFFF" }, vvqparamsvvqattributes); 
</script> 

</div> 
The problem is, that everything between <div class="entry"> and </div> is allways different.

I guess the theory is like this:

1. Search between <div class="entry"> and </div> for 300 and 225
2. Replace every 300 with 600 and every 225 with 400.

I stumbled accross preg_replace and str_replace etc., read the manuals, read tons of other articles and stuff, but did not came up with a sollution.

Im absolutely new to php and only familiar with html and css.
Please help! :)

Thank you!
Stahlblau is offline  
Reply With Quote
 



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

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to search the content of txt file meshi Absolute Beginners 11 11-01-2007 04:43 PM


All times are GMT. The time now is 06:59 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design