GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Anyone have a swfobject regex handy? (https://gfy.com/showthread.php?t=1093797)

fris 12-21-2012 12:44 PM

Anyone have a swfobject regex handy?
 
looking to grab just the mp4 url

Code:

so.addVariable('file','http://media.domain.com/videos/filename.mp4');

AutumnBH 12-21-2012 01:20 PM

Assuming you want php and your html is in $html:

Code:

<?php

$html = "so.addVariable('file','http://media.domain.com/videos/filename.mp4');";

preg_match("/so.addVariable\('file','([^']*)'\);/", $html, $regs);

$mp4_url = $regs[1];

echo "$mp4_url\n";

?>


woj 12-21-2012 01:28 PM

wait a min, so all the tips you were posting before weren't your own? you were just reposting them?

fris 12-21-2012 02:44 PM

Quote:

Originally Posted by woj (Post 19383539)
wait a min, so all the tips you were posting before weren't your own? you were just reposting them?

yes they were ;)

was looking for saving of work, i ended up doing a simple http url regex which works.


All times are GMT -7. The time now is 06:45 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123