Jump to content

ravi181229

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Everything posted by ravi181229

  1. Thanks a lot. Finally it worked with : RewriteCond %{QUERY_STRING} hid=([0-9].*) RewriteRule ^hotel-([0-9]{1,8})-.* /myfile.php?hid=$1 [L] Thank you, Ravi
  2. Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule ^.+-(\d+?)-.*?\.html$ myfile.php?hid=$1 [NC]
  3. it's redirecting to hotel-22-The-Taj-Hotel.html and shows 'Now Found'.
  4. Hi, I have a link <a href="hotel-22-The-Taj-Hotel.html">The Taj Hotel</a> when I click on this, I would like to redirect to myfile.php?hid=22 How do I set this in .htaccess file. Thank you, Ravi
  5. Thanks, sorry, it should be 22. my mistake. I have a link <a href="hotel-22-The-Taj-Hotel.html">The Taj Hotel</a> when I click on this, I would like to redirect to myfile.php?hid=22 I will post in mod_rewrite forum.
  6. Hi, I have a link <a href="hotel-22-The-Taj-Hotel.html">The Taj Hotel</a> when I click on this, I would like to redirect to myfile.php?hid=24 How do I set this in .htaccess file. Thank you, Ravi
  7. Hi All, Would you help me in creating an .xls file and writing (exporting) data (from my DB) to .xls file through script. Thank you, Ravi
  8. Thanks a lot for you help. Your answers got my work done. Final code (which works according to my expectations) : function excel_MDY2DMY($mdy) { $date_arr = preg_split("/(\.|-|\/)+/", $mdy); $dmy = (count($date_arr) == 1) ? date("Y-m-d", strtotime($date_arr[0])) : $date_arr[2]."-".$date_arr[0]."-".$date_arr[1]; return $dmy; } Thanks for your time. Ravi
  9. Hi, I would like to format a date. first it should search for . - / (date separators) and if finds split it. I was using : $date_arr = preg_split("/[.|-|\/]/", $date); but it does not work. Please help me with this. Thanks for your time. Ravi
  10. Thank you for the suggestion.
  11. Hi, Is it possible to retrieve only feed URI from the Web Page ? I am able to retrieve feed content from the Web Page with : $feed = Zend_Feed::findFeeds($uri); How do I retrieve only the feed URI ? Thanks, Ravi
  12. oh..ok Friends, Thanks a lot for your inputs. Ravi
  13. Hi, If there is a RSS feed in our web site then browser automatically adds the RSS icon on the right corner or the address bar but I would like to add my own RSS Feed icon on the right corner of the address bar. Is it possible ? I need your help. Thanks, Ravi
  14. these are extra characters, like : 32a45 <?xm..........?> </rss> 0
  15. Error type: Php Warning Message: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 276: parser error : Opening and ending tag mismatch: description line 268 and style
  16. Hi, I am trying to import a feed and read it using SimpleXMLElement. first I found that it has extra characters at the beginning and at the end, so I wrote code which removes extra characters : $link = 'http://ustream.tv/live.rss'; $rss_feed = file_get_contents($link); //$rss_feed = str_replace("utf-8", "iso-8859-1", $rss_feed); $rss_feed = substr($rss_feed, 5); $rss_feed = ltrim($rss_feed); $rss_feed = substr($rss_feed, 0, -5); $rss_feed = rtrim($rss_feed); $ustream = new SimpleXMLElement($rss_feed); $casts = $ustream->channel->item; foreach ($casts as $cast) { echo "<br>Title:".$cast->title; } but still it displays error. I need your help. Thanks, Ravi
  17. I could fetch the data as follows: preg_match('~<tr><td class="yspdetailttl" valign="bottom" height="12"> Wed, Dec 10</td></tr>(.*)</table>~s',$html,$matches); but still have problem to get all the events' information under particular date.
  18. ok...can we write the regex to fetch the data in red color below: <table border="0" cellspacing="0" cellpadding="2" class="ysprow1" width="100%" style="border-collapse: collapse" bordercolor="#111111"><tr><td class="yspdetailttl" valign="bottom" height="12"> Wed, Dec 10</td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Indiana <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10331118','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span> vs. TCU <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10644764','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_audio_box.gif" width="16" height="12" alt="Free Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 6:00 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Long Island <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10730677','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_audio_box.gif" width="16" height="12" alt="Free Audio"></a> </span> vs. Iona <span class='yspscores'></span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 7:00 pm EST </td> </tr> </table></td></tr> </table> I was trying with: //$html contains above code preg_match_all("~<tr><td class=\"yspdetailttl\" valign=\"bottom\" height=\"12\"> Wed, Dec 10</td></tr><tr><td>(.*)</td></tr>~", $html, $matches);
  19. I could finally write the code to get content between <table...>......</table> : $patterns = ' width="100%" style="border-collapse: collapse" bordercolor="#111111"'; $html = str_replace($patterns, "", $html); preg_match_all('~class="ysprow1">(.*)~is',$html,$matches); print_r($matches);
  20. Hi, I would like to parse the html code and get the data between <table border="0" cellspacing="0" cellpadding="2" class="ysprow1" width="100%" style="border-collapse: collapse" bordercolor="#111111"> </table> html cdoe: <table border="0" cellspacing="0" cellpadding="2" class="ysprow1" width="100%" style="border-collapse: collapse" bordercolor="#111111"><tr><td class="yspdetailttl" valign="bottom" height="12"> Mon, Dec 8</td></tr><tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Kentucky: Big Blue Sports Shows</td> <td nowrap> <span class="yspscores"> <a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10533242','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_audio_box.gif" width="16" height="12" alt="Free Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 6:00 pm EST</td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Lehigh <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10603183','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_video_box.gif" width="16" height="12" alt="Subscription Video"></a> </span> vs. Albany <span class='yspscores'></span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 6:30 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Alabama: Hey Coach</td> <td nowrap> <span class="yspscores"> <a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10201617','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 7:00 pm EST</td> </tr> </table></td></tr> </table> Need help. Thanks.
  21. this code works perfectly but it does not display all the events for a particular date. for examle(there can be many events under particular date): Fri, Dec 5 • Stony Brook vs. Lehigh Subscription Audio 6:30 pm EST • Hope Free Audio vs. Carthage 6:40 pm EST • Pennsylvania Subscription Audio vs. Navy Subscription Audio 7:00 pm EST • Iowa Subscription Audio vs. Bryant 7:30 pm EST • Texas A&M vs. Arizona Free Audio 8:30 pm EST Sat, Dec 6 • Davidson vs. N.C. State Subscription Audio 12:00 pm EST • Holy Cross vs. W. Michigan Subscription Audio 12:30 pm EST • Indiana Subscription Audio vs. Gonzaga 12:30 pm EST • Iowa St. Subscription Audio vs. Oregon St. Subscription Audio 1:30 pm EST • Kansas vs. Jackson St. Free Audio 2:00 pm EST HTML code : <table border="0" cellspacing="0" cellpadding="2" class="ysprow1" width="100%" style="border-collapse: collapse" bordercolor="#111111"><tr><td class="yspdetailttl" valign="bottom" height="12"> Fri, Dec 5</td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Hope <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10092771','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_audio_box.gif" width="16" height="12" alt="Free Audio"></a> </span> vs. Carthage <span class='yspscores'></span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 5:40 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Stony Brook <span class='yspscores'></span> vs. Lehigh <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10603182','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 6:30 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Pennsylvania <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10838785','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span> vs. Navy <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10689020','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 7:00 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Iowa <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10219999','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span> vs. Bryant <span class='yspscores'></span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 7:30 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Texas A&M <span class='yspscores'></span> vs. Arizona <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10590979','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_audio_box.gif" width="16" height="12" alt="Free Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 8:30 pm EST </td> </tr> </table></td></tr> </table><table border="0" cellspacing="0" cellpadding="2" class="ysprow1" width="100%" style="border-collapse: collapse" bordercolor="#111111"><tr><td class="yspdetailttl" valign="bottom" height="12"> Sat, Dec 6</td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Davidson <span class='yspscores'></span> vs. N.C. State <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10663073','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 12:00 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Holy Cross <span class='yspscores'></span> vs. W. Michigan <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10592143','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 12:30 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Indiana <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10331117','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span> vs. Gonzaga <span class='yspscores'></span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 12:30 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Iowa St. <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10345634','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span> vs. Oregon St. <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10580288','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_audio_box.gif" width="16" height="12" alt="Subscription Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 1:30 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Providence <span class='yspscores'></span> vs. Rhode Island <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10487157','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_audio_box.gif" width="16" height="12" alt="Free Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 2:00 pm EST </td> </tr> </table></td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Kansas <span class='yspscores'></span> vs. Jackson St. <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10530559','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_audio_box.gif" width="16" height="12" alt="Free Audio"></a> </span></td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 2:00 pm EST </td> </tr> </table></td></tr>
  22. I would also like to have the link (sorry, I missed it in previous post): Sat, Dec 6 • San Francisco Free Video vs. Long Beach St. - Men's Basketball 10:00 pm EST http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10487697 Mon, Dec 8 • Lehigh Subscription Video vs. Albany - Men's Basketball 6:30 pm EST http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10603183
  23. from the following code: <table border="0" cellspacing="0" cellpadding="2" class="ysptblclbg4" width="100%" style="border-collapse: collapse" bordercolor="#111111"><tr><td class="yspdetailttl" valign="bottom" height="12"> Sat, Dec 6</td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; San Francisco <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10487697','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/free_video_box.gif" width="16" height="12" alt="Free Video"></a> </span> vs. Long Beach St. <span class='yspscores'></span> - Men's Basketball </td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 10:00 pm EST </td> </tr> </table></td></tr> </table><table border="0" cellspacing="0" cellpadding="2" class="ysptblclbg4" width="100%" style="border-collapse: collapse" bordercolor="#111111"><tr><td class="yspdetailttl" valign="bottom" height="12"> Mon, Dec 8</td></tr> <tr><td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td nowrap> &#149; Lehigh <span class='yspscores'><a href="javascript:void(window.open('http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10603183','playerWindow','width=793,height=608,scrollbars=no'));" ><img border="0" src="http://l.yimg.com/a/i/us/sp/ed/ic/pay_video_box.gif" width="16" height="12" alt="Subscription Video"></a> </span> vs. Albany <span class='yspscores'></span> - Men's Basketball </td> <td nowrap> </td> <td width="100%" nowrap class="yspscores"> 6:30 pm EST </td> </tr> </table></td></tr> </table> </table> I would like to display : Sat, Dec 6 • San Francisco Free Video vs. Long Beach St. - Men's Basketball 10:00 pm EST Mon, Dec 8 • Lehigh Subscription Video vs. Albany - Men's Basketball 6:30 pm EST
  24. Hi, I would like to parse http://rivals.yahoo.com/ncaa/baseball/collegebroadcast html page and get all events' info for particular date: for example Sat, Dec 6 (get this date and all the events info for this date) San Francisco vs. Long Beach St. - Men's Basketball 10:00 pm EST http://cosmos.bcst.yahoo.com/up/collegetest/?cl=10487697 Mon, Dec 8(get this date and all the events' info for this date) and so on. need help. Thanks
  25. well, it says : Warning: Invalid argument supplied for foreach() in /server/vhtdocs/nowhound.sqlfusion.com/Kyte/getInfo.php on line 36
×
×
  • 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.