Jump to content

gaza165

Members
  • Posts

    472
  • Joined

  • Last visited

    Never

About gaza165

  • Birthday 10/13/1987

Contact Methods

  • Website URL
    http://www.thedesignmonkeys.co.uk

Profile Information

  • Gender
    Male
  • Location
    United Kingdom

gaza165's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. I cant see it in the settings!!
  2. Hi guys, My word press installation is currently in my directory http://www.example.com/wordpress Howevere when i try to access a post it sends me to http://www.example.com/?p=3#comments Is there anything I can do about this, I have set the appropriate target in the word press settings. Can i make a rewrite rule to deal with this...if so can someone help me with the right expression to use to achieve it. Thanks Garry
  3. I have a string <p>Bollywood romcom: a pair of wouldbe suicides choose the same bridge at the same time.</p><p><a href="http://www.dailyinfo.co.uk/reviews/venue/1320/Vue_Cinema">Vue Cinema</a> (<a href="http://www.myvue.com/cinemas/index.asp?SessionID=0D86903A19334C93A7491563A77862A3&cn=1&ln=1&ci=66" target="_blank">www.myvue.com/cinemas/index.asp?SessionID=0D86903A19334C93A7491563A77862A3&cn=1&ln=1&ci=66</a>), Ozone Leisure Park, Grenoble Road (next Kassam Stadium), Oxford OX4 4XP; Tel. 08712 240 240 (10p per min from BT).<br /> </p> Using php i want to extract http://www.myvue.com/cinemas/index.asp?SessionID=0D86903A19334C93A7491563A77862A3&cn=1&ln=1&ci=66 from the <a> tag. I have already tried using <?php $pattern = "/<a href=\"([^\"]*)\">(.*)<\/a>/iU"; preg_match_all($pattern, $link, $matches); var_dump($matches); ?> The output I get is array 0 => array 0 => string '<a href="http://www.dailyinfo.co.uk/reviews/venue/1320/Vue_Cinema">Vue Cinema</a>' (length=81) 1 => array 0 => string 'http://www.dailyinfo.co.uk/reviews/venue/1320/Vue_Cinema' (length=56) 2 => array 0 => string 'Vue Cinema' (length=10)
  4. I have multiple arrays containing data for each entry. What I am trying to do is group each item in the array by the date which is also in an array. Where do I start?? array 'pubDate' => string 'Mon, 15 Feb 10 00:00:00 +0000' (length=29) 'title' => object(SimpleXMLElement)[6] 'description' => object(SimpleXMLElement)[7] 'guid' => string 'http://www.dailyinfo.co.uk/events.php?colname=Events&period=7&eventday=25&eventmonth=9&eventyear=2010#72741' (length=107) 'link' => string 'http://www.dailyinfo.co.uk/events.php?colname=Events&period=7&eventday=25&eventmonth=9&eventyear=2010#72741' (length=107) array 'date' => array 0 => string '2010-09-25T01:00:00+01:00' (length=25) 1 => string '2010-10-02T01:00:00+01:00' (length=25) ------------------------------------------------------------------------------------------------------------------- array 'pubDate' => string 'Fri, 26 Feb 10 00:00:00 +0000' (length=29) 'title' => object(SimpleXMLElement)[5] 'description' => object(SimpleXMLElement)[8] 'guid' => string 'http://www.dailyinfo.co.uk/events.php?colname=Events&period=7&eventday=1&eventmonth=10&eventyear=2010#73266' (length=107) 'link' => string 'http://www.dailyinfo.co.uk/events.php?colname=Events&period=7&eventday=1&eventmonth=10&eventyear=2010#73266' (length=107) array 'date' => array 0 => string '2010-09-25T01:00:00+01:00' (length=25) 1 => string '2010-09-30T01:00:00+01:00' (length=25) -------------------------------------------------------------------------------------------------------------------
  5. anybody?
  6. Can someone tell me the best way to group elements in an XML file? <item> <title>Event 1</title> <dc:date>2010-09-25T01:00:00+01:00</dc:date> <dc:date>2010-10-02T01:00:00+01:00</dc:date> <dc:date>2010-10-09T01:00:00+01:00</dc:date> </item> <item> <title>Event 2</title> <dc:date>2010-09-25T01:00:00+01:00</dc:date> <dc:date>2010-10-02T01:00:00+01:00</dc:date> <dc:date>2010-10-09T01:00:00+01:00</dc:date> </item> Above is an example of what im trying to do and below is what i want the output to be 25th September 2010 Event 1 Event 2 2nd October 2010 Event 1 Event 2 And so on, can anyone point me in the right direction on where to start looking to do something like this in PHP. Thanks Garry
  7. Well it doesnt really but I was trying to figure out a way to get the sort of thing im looking for.
  8. What im trying to do is this... I have an XML File and i want to sort the events out by date So like 26th Septemeer List of all the events that have this date in their <dc:date> field. 28th September List of all the events that have this date in their <dc:date> field. XML FILE <?xml version="1.0" encoding="UTF-8"?> <rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:xCal="urn:ietf:params:xml:ns:xcal" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" > <channel> <item> <title><![CDATA[15 Feb 2010 - 10 Oct 2010: Funk, Soul, Disco, Hiphop]]></title> <geo:lat>51.74713</geo:lat><geo:long>-1.23755</geo:long> <dc:date>2010-09-25T01:00:00+01:00</dc:date> <dc:date>2010-10-02T01:00:00+01:00</dc:date> <dc:date>2010-10-09T01:00:00+01:00</dc:date> </item> <item> <title><![CDATA[26 Feb 2010 - 26 Oct 2010: Get Down]]></title> <geo:lat>51.74707</geo:lat><geo:long>-1.2351</geo:long> <dc:date>2010-09-24T01:00:00+01:00</dc:date> <dc:date>2010-10-01T01:00:00+01:00</dc:date> <dc:date>2010-10-08T01:00:00+01:00</dc:date> <dc:date>2010-10-15T01:00:00+01:00</dc:date> <dc:date>2010-10-22T01:00:00+01:00</dc:date> </item> </channel> </rss>
  9. Sorry i should have explained better...I am not bringing the dates back from a database but bringing them back from an xml file
  10. Maybe if i post the code im doing you can better understand. <?php $feed = file_get_contents("events.xml"); $xml = new SimpleXmlElement($feed); $time = time(); foreach ($xml->channel->item as $entry){ $dc = $entry->children("http://purl.org/dc/elements/1.1/"); $geo = $entry->children("http://www.w3.org/2003/01/geo/wgs84_pos#"); echo "Title: ".$entry->title."</br>"; //Dates that event is on. foreach($dc as $date) { echo "Date: ".strtotime($date)."<br/>"; } //Geo Location - Latitude and Londitude echo "Lat: ".$geo[0]."<br/>"; echo "Long: ".$geo[1]."<br/>"; echo "------------------------------------------------------------<br/>"; } ?>
  11. This is probably a really easy question say i have timestamps like this Date: 1285372800 Date: 1285977600 Date: 1286582400 How can i find out and assign to a variable which of those is on or closest to todays date??
  12. I get the error "Node no longer exist"
  13. Hello, I have an xml file below with multiple namespaces called "date". I want to know how to echo out each date that is associated with that "item" if that makes sense. Thanks <?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel> <item> <title>My Title</title> <dc:date>2009-02-12</dc:date> <dc:date>2010-09-01</dc:date> </item> </channel> </rss>
  14. Hi Guys, I have produced and uploaded 3 different designs for you to look at. Can you give me a critique and your opinon on which one you think is the best. Thanks Site 1: http://www.thedesignmonkeys.co.uk/TheMillV1 Site 2: http://www.thedesignmonkeys.co.uk/TheMillV2 Site 3: http://www.thedesignmonkeys.co.uk/TheMillV3 I personall like number 3 the best, but it would be nice to get an outside opinon. Thanks for taking the time to look Garry
  15. Hi Guys, Can you critique a project i am currently working on... http://www.thedesignmonkeys.co.uk/TheMill Thanks Garry
×
×
  • 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.