ctcmedia
Members-
Posts
17 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
ctcmedia's Achievements
Newbie (1/5)
0
Reputation
-
actualy how would i parse everyline of an output (this might be in wrong category) its for the same output thanks Paul
-
Thanks for that It isnt working there is more to the page I am trying to get the whole lot but it is a webpage that I am scraping -> http://www.110sport.tv/MatchShedule.aspx trying to get all matches thanks Paul
-
Having a couple of problems with regexing the following code <p> <strong>10am</strong> <br/> <strong>Match 1</strong> – BLAH BLAH <br/> <strong>Match 2</strong> – BLAH BLAH <br/> <strong>Match 3</strong> – BLAH BLAH <br/> <strong>Match 4</strong> – BLAH BLAH <br/> <strong>Match 5</strong> – BLAH BLAH <br/> <strong>Match 6</strong> – BLAH BLAH <br/> <strong>Match 7</strong> – BLAH BLAH <br/> <strong>Match 8</strong> – BLAH BLAH <br/> </p> Namely being I dont know how to any tips, advice, links ?? thanks Paul
-
I want to create a SEO friendly site and I have used mod rewrite(even though i dont know how to work it) to arrange the vars for me but as I am making custom functions I thought I would make a viewController and I want to use the following code <?php // Example URL http://localhost/page/227/more/772 $urlVar = explode("/",$HTTP_SERVER_VARS['PATH_INFO']); $page = $urlVar[1]; $extra = $urlVar[3]; ?> So what I am looking for is for the mod rewrite to just access the index.php and the php script will detect vars etc.... Is it possible? can you help? Thanks Paul
-
actualy just found the problem the flash player only loads if you have javascript and flash enabled and I am only curling into the page.. is there any options to enable these or am I just stuck with what I have?
-
cool forgot the all I got it parsing all I wanted from that page was the links so I can spider out and gather information like title description etc all is good apart from trying to extract the flash vars this is an example of the code I am trying to get <div id="flashContainer" class="cb flashEnabled hidden"> <object id="catchUpPlayer" width="625" height="1" type="application/x-shockwave-flash" data="/static/programmes/asset/flash/swf/4odplayer-4.30.2.swf"> <param name="align" value="top"/> <param name="scale" value="noscale"/> <param name="salign" value="lt"/> <param name="allowFullScreen" value="true"/> <param name="bgcolor" value="#000000"/> <param name="allowScriptAccess" value="always"/> <param name="wmode" value="opaque"/> <param name="flashvars" value="brandTitle=Peep%20Show&wsBrandTitle=peep-show&primaryColor=0xCC0000&secondaryColor=0xCC0000&invertSkin=false&preSelectAsset=3005546&preSelectAssetGuidance=Strong%20language%20and%20adult%20humour&preSelectAssetImageURL=/assets/programmes/images/peep-show/series-6/episode-6/3b010dd1-69d3-490c-9985-19ad79f20557_625x352.jpg&pinRequestCallback=C4.PinController.doPinChecks"/> </object> and I am trying to get the "preSelectAssetImageURL=/assets/programmes/images/peep-show/series-6/episode-6/3b010dd1-69d3-490c-9985-19ad79f20557_625x352.jpg" out of it ... I am trying preg match again but nothing seems to be working <?php require('function.php'); $url = "http://www.channel4.com/programmes/peep-show/4od"; $page = curlEngine($url); // Find Image flashContainer preg_match('#<object\b[^>]*id=([\'"])?catchUpPlayer(?(1)\1)[^>]*>.*?</object>#s', $page['content'], $bigImage); ?> any hints thanks Paul
-
i was thinking of going down the DOM route using xpath but thought I would give preg match ago... Ill try that if fails time to read up on xpath lol
-
I dont know if this is in the right section but it has regex in it?!?! What I am trying to do is scrape http://www.channel4.com/programmes/4od/all to get the titles and links so I can recurse through the website picking up information I know how to get the title names and hrefs through regex but MAJOR but There are a lot of spans I am trying to get with the same name so my question is How can I loop through the results to get all title names and links etc... I have some code that I am just trying with which has the problems <?php require('function.php'); // Has some custom functions in this file $url = "http://www.channel4.com/programmes/4od/all"; // Url we are searching $getUrl = curlEngine($url); $content = $getUrl['content']; preg_match('#<span\b[^>]*class=([\'"])?programme-info(?(1)\1)[^>]*>.*?</span>#s', $content, $match); foreach($match as $match){ print $match; } ?> Any help would be appreciated Thanks Paul
-
Hi, Here is my problem. I have a streaming service that works ok for using a dynamic database passing a variable from an external source. But what I want to do is stream from a local server but using a devise called flvstreamer. The reason why I cannot really plugin the service into my existing program is because it is written in perl although I know the basics this is too complicated to start mashing around Here is what I think will work (still need help) <?php header('Content-type: video/x-flv'); $url = $_GET['vidUrl']; exec('/home/public/flvstreamer' , '--host $url'); ?> Now it should be that simple but the system is not executing the video and I donot know what the problems are. Could anyone give any tips or advise all is greatly appreciated
-
here is what I am trying to do I have the basic mod rewrite for say index.php?view=home and in the htaccess file i have RewriteEngine on RewriteRule ^([A-Za-z0-9-]+)$ index.php?view=$1 [L] Now what I am trying to do is get this to work in htaccess index.php?view=home&p=more I havent had much time with mod rewrite and tbh I havent needed more than one variablie in the url. If yuo could point me in the right direction that would be ace Thanks
-
THANK YOU KEITH this one done the trick SELECT a.* FROM programme a INNER JOIN (SELECT title, MIN(pid) AS MinPid FROM programme WHERE title LIKE 'A%' GROUP BY title) b ON a.title = b.title AND a.pid = b.MinPid Sorry for being a pain my brain has been slow for a good few weeks Thanks again
-
Hi thanks I tried but it wont get me the full row. for instance I am using SELECT DISTINCT title FROM programme WHERE title LIKE 'A%' it works for just bringing back the title but I am needing one more item to get me to a result page which is pid now when I use the following SELECT DISTINCT title, pid FROM programme WHERE title LIKE 'A%' It does what it was before and list everything any ideas?
-
I see that would work if I am wanting one programme but what it is <programme> <AZ letter="A"> <?php $queryA = mysql_query("SELECT * FROM programme WHERE title LIKE 'A%'"); while($rowA=mysql_fetch_array($queryA, MYSQL_ASSOC)){ ?> <title><?=$rowA['title']?></title> <description><?=$rowA['description']?></description> <pID><?=$rowA['pID']?></pID> <?php } ?> </AZ> </programme> So on and so forth. Since I have this updating the db every hour I wont know what show to look for to put into distinct
-
Hi, Yes it all gets parsed into one table incl all relevant data. I am trying to show one result for each programme but instead it shows all programmes including all episodes its for an xml structure a to z
-
that would be excellent but I donot have control over the list it comes from the BBC and Parses it into the DB. So is there no other way ? Thanks