Jump to content

nickjonnes

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Everything posted by nickjonnes

  1. holy crap i love you! i have had this an another thing that i have spent ages on - simply because i am not php coder - and you have solved it thank you so much
  2. hey all, i solved the issue, it took me ages and i learnt a lot as i am not a php coder but here it what i did. all form the power of google;) thanks to everyone who helped and sorry to be so confusing <?php include 'simple_html_dom.php'; // Create DOM from string $dom = file_get_html('http://www.mail.com/'); $table = $dom->getElementById('slide-wrapper'); //$ret = $html->find('div[class id=content'); echo $table; ?>
  3. the document i am trying to get this from is mail.com it is their news slider. if you rightclick and go to view source you will see the a huge page. i have already read through it all and worked out that this part is the only part i need that is dynamic the rest is jsut fixed code like the slide. it is only the content that changes.
  4. yes i have an xml feed here is the link if you would like: http://feeds.nationalgeographic.com/ng/photography/photo-of-the-day.atom i want to get the picture of the day and post it on my website. i am sorry for any confusion.
  5. i dont understand how i can make it get the source from a url like so. http://example.com (which contains the image)
  6. hey all, i as you will be able to see below i have a large amount of div's inside div's i need to get allthe information from the div class "items". i am sorry to post such a large source but i didnt want to half write out the source and waste everyones time. i have spent a large amount of time trying to figure this one out and i have been googling alot but i seem to have no luck. can anyone please help? <div class="content"> <div class="main"> <div class="hero hero-small"> <div id="slide-wrapper"> <div class="items"> <div class="container-outer"> <div class="container-inner"> <img src= "www.example.com/picture.jpg" class= "class" style="width: 300px; height: 200px;" /><a href= "www.importantsite.com/" target="_blank"> <h3>title</h3></a> <a href= "http://anotherimportantsite.com/"target="_blank"> <h4><span>blahblah</span></h4></a><p>blahblah<span>... <img src="http://example.com/blah.gif" alt="" class="example" /></span></p> </div> </div> <div class="container-outer"> <div class="container-inner"> <img src= "www.example.com/picture.jpg" class= "class" style="width: 300px; height: 200px;" /><a href= "www.importantsite.com/" target="_blank"> <h3>title</h3></a> <a href= "http://anotherimportantsite.com/"target="_blank"> <h4><span>blahblah</span></h4></a><p>blahblah<span>... <img src="http://example.com/blah.gif" alt="" class="example" /></span></p> </div> </div> <div class="container-outer"> <div class="container-inner"> <img src= "www.example.com/picture.jpg" class= "class" style="width: 300px; height: 200px;" /><a href= "www.importantsite.com/" target="_blank"> <h3>title</h3></a> <a href= "http://anotherimportantsite.com/"target="_blank"> <h4><span>blahblah</span></h4></a><p>blahblah<span>... <img src="http://example.com/blah.gif" alt="" class="example" /></span></p> </div> </div> </div> </div> </div>
  7. hey all, now i have tried for hours to try and figure this out and it seems so simple and now i am getting really frustrated with it. i want to take out the img source(line 7 and embed the image in my site.). the xml looks like this 1.<channel> 2. <item> 3. <title>blah</title> 4. <link>www.example.com</link> 5. <description> 6. <![CDATA[<p>blah blah blah blah blah</p><a href=http://link.com><img 7. src= http://www.linktoimage.com/link.jpg/></a> 8. </description> 9.</item> 10.</channel>
  8. im just copying the original embed script and adding in my dynamic url the original one works but i cant see why mine does embed/param tags arnt fully supported.
  9. hey all, i am trying to embed a video from a news site. i am getting the link from an atom feed then trying to add it into an embed video code. the embeding code looks like this: <?php $xml = simplexml_load_file('http://video.news.com.au/feed.atom'); //echo "Link - {$xml->entry[0]->link->attributes()->href}<br>"; $link = "{$xml->entry[0]->link->attributes()->href}"; echo "{$link}"; ?> <body> </body> </html> <iframe src ="<?php echo $link; ?>?player=narrow" width="330" height="335" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"><p><a href="<?php echo $link; ?>"></a></p></iframe> i tried that and it shows the top left of the actuall website not the embeded video like it should the embed video source looks like this: <iframe src ="http://video.news.com.au/embed/1969930780/Radical-reforms-for-cattle-industry?player=narrow" width="330" height="335" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"><p><a href="http://video.news.com.au/1969930780/Radical-reforms-for-cattle-industry">VIDEO: 'Radical reforms' for cattle industry</a></p></iframe> hope someone can help work out whats going on cheers, nick
  10. hey all i im trying to get the video link from this attom feed so far i have been sucessfull although i only want the first one not a whole list of themcan anyone help me here is my code. <?php $xml = simplexml_load_file('http://video.news.com.au/feed.atom'); foreach( $xml->entry as $entry ) { echo "Link - {$entry->link->attributes()->href}<br>"; } ?>
  11. no the value of $url or whatever will be dynamic so that wont work
  12. hey all, here is the xml code <title>Dogged determination</title> <link rel="alternate" href="http://video.news.com.au/1959670201/Dogged-determination" /> <author> <name>mr mittens</name> </author> now to parse this to get the title i would do this but what if i want the link? <?php$feed = simplexml_load_file('http://video.news.com.au/feed.atom');$link = (string) $feed->entry->title;echo $link;?> but what do i do to get the 'link'? i tried link an that obviously didnt work. cheers nick
  13. hey guys, what i have done so far is got the link to a bbc video feed so when you go to my site the php code will retrive the latest video from bbc and get the link. so i now have $url as having the value of the video but i now need to insert it into the html embed video code. so how can i make this. <object width="416" height="374" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ep"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="movie" value="http://i.cdn.turner.com/cnn/.element/apps/cvp/3.0/swf/cnn_416x234_embed.swf?context=embed_edition&videoId=world/2009/06/28/penhaul.lok.honduras.cnn" /><param name="bgcolor" value="#000000" /><embed src="http://i.cdn.turner.com/cnn/.element/apps/cvp/3.0/swf/cnn_416x234_embed.swf?context=embed_edition&videoId=world/2009/06/28/penhaul.lok.honduras.cnn" type="application/x-shockwave-flash" bgcolor="#000000" allowfullscreen="true" allowscriptaccess="always" width="416" wmode="transparent" height="374"></embed></object>
  14. i fixed it, didnt have the $ sign at start but now im getting "unexspected T_string" <?php $dom = new DOMDocument('1.0','ISO-8859-1'); $dom->load("http://feeds.bbci.co.uk/news/video_and_audio/science_and_environment/rss.xml"); $elements = $dom->getElementsByTagName("guid"); for each ($element in $elements) {echo $element->innerHTML;} ?>
  15. thanks for that im getting an error saying unexspected '=' sign in line two i remove it and i get a parsing error.? cheers nick btw i got php5 i just stuffed up im sorry about that
  16. php 4. could you please show me how you would do this? cheers nick
  17. oh sorry shouild have said function value_in($element_name, $xml, $content_only = true) { if ($xml == false) { return false; } $found = preg_match('#<'.$element_name.'(?:\s+[^>]+)?>(.*?)'. '</'.$element_name.'>#s', $xml, $matches); if ($found != false) { if ($content_only) { return $matches[1]; //ignore the enclosing tags } else { return $matches[0]; //return the full pattern match } } // No match found: return false. return false; }
  18. hey all, i am trying to get the first url from a rss feed this is the rss feed link: 'http://feeds.bbci.co.uk/news/video_and_audio/science_and_environment/rss.xml' i think the issue may be to do with two things first it is a child of the item tag second it has an odd tag name ie. <guid isPermaLink="false"><guid> the feed looks like this <item> <title>this is a title</title> <link>link to the article</link> <guid isPermaLink="false">http://www.cnn.com/video/#/video/bestoftv/2011/05/27/arena.mets.cnn</guid> <description>d</description> <category>bestoftv</category> <pubDate>Sat, 28 May 2011 01:39:51 GMT</pubDate> <feedburner:origLink>http://www.cnn.com/video/#/video/bestoftv/2011/05/27/arena.mets.cnn</feedburner:origLink> </item> my php code to grab the video link <?php if (file_exists('http://feeds.bbci.co.uk/news/video_and_audio/science_and_environment/rss.xml')) { $xmldata = file_get_contents("http://feeds.bbci.co.uk/news/video_and_audio/science_and_environment/rss.xml"); $url = value_in('guid isPermaLink="false', $xmldata); print_r($url); } else { exit('Failed to open xml data'); } ?> i hope someone can help as i have been trying hard to fix this issue cheers nick
  19. nope it is ignoreIndex .htaccess ignoreIndex *.jpeg but both the htaccess file and the jpg file show up on the site? cheers nick
  20. i made a .htaccess file and put that code in still if you go to the site there isn't anything new?
  21. hey all, i have an issue, i have a directory site called hackingtoolz.tk and if you go to it, you will see a list of folders as it is just a directory the problem is how to i stop the banner from apearing in the directory. i have tried changing the chmod to 4000 and that just made the jpeg stay their and the banner screw up if you go to the site you will understand what i mean better hope you can help cheers nick
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.