Jump to content

xsist10

Members
  • Posts

    114
  • Joined

  • Last visited

    Never

Everything posted by xsist10

  1. I found a solution: [code] $password = 19721972; //$password = md5($password, true); $password = pack("H*", md5($password)); $password = base64_encode($password); echo $password; [/code]
  2. [url=http://www.php.net/md5]http://www.php.net/md5[/url] [code]Note:  The optional raw_output parameter was added in PHP 5.0.0 and defaults to FALSE[/code] You must have an older version of PHP running.
  3. Sorry... my bad Your developer uses raw md5 output... this fixes it [code] $password = 19721972; $password = md5($password, true); $password = base64_encode($password); [/code]
  4. I found your problem. You had [code] $password=19721972; md5($password); base64_encode($password); echo $password; [/code] What you want is this [code] $password = 19721972; $password = md5($password); $password = base64_encode($password); echo $password; [/code]
  5. Firstly you can reduce this: [code] if ($random_variable1 == 1) {       ?>       <input type="checkbox" name="boring" checked>       <?   } else {       ?>       <input type="checkbox" name="boring">       <?   } [/code] to [code] <input type="checkbox" name="boring" <?php ($random_variable ? echo "checked" : ""); ?>> [/code]
  6. How about this [code] $xml[] = 'http://digg.com/rss/index.xml'; $xml[] = 'http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml'; function get_RSS($url) { $RSS = simplexml_load_file($url); $channel["link"] = $RSS->channel->link; $channel["title"] = $RSS->channel->title; $index = 0; foreach ($RSS->channel->item as $article) { $channel["article"][$index]["link"] = $article->link; $channel["article"][$index]["title"] = $article->title; $channel["article"][$index]["description"] = $article->description; $channel["article"][$index]["pubDate"] = $article->pubDate; $index++; } return $channel; } $feed = get_RSS($xml[0]); echo '<h1><a href="' . $feed["link"] . '">' . $feed["title"] . '</a></h1>'; for ($i=0; $i<10; $i++) { echo '<ul>' . "\n"; echo '  <li class="title"><a href="' . $feed["article"][$i]["link"] . '">' . $feed["article"][$i]["title"] . '</a></li>' . "\n"; echo '  <li class="description">' . $feed["article"][$i]["description"] . '</li>' . "\n"; echo '  <li class="pubDate">' . $feed["article"][$i]["pubDate"] . '</li>' . "\n"; echo '</ul>' . "\n\n"; } [/code]
  7. The cheap and nasty way would be as follows [code] $xml[] = 'http://digg.com/rss/index.xml'; $xml[] = 'http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml'; function get_RSS($url, $limit = 10) { $RSS = simplexml_load_file($url); echo '<h1><a href="' . $RSS->channel->link . '">' . $RSS->channel->title . '</a></h1>'; $current = 0; while ($current < $limit) { foreach ($RSS->channel->item as $article) { echo '<ul>' . "\n"; echo '  <li class="title"><a href="' . $article->link . '">' . $article->title . '</a></li>' . "\n"; echo '  <li class="description">' . $article->description . '</li>' . "\n"; echo '  <li class="pubDate">' . $article->pubDate . '</li>' . "\n"; echo '</ul>' . "\n\n"; $current++; } } } get_RSS($xml[0]); [/code] However if you want 10 headlines in total (from all your feeds) you should change the get_RSS function to return an array instead of printing the results out and then use that array to generate your display (you can limit the array, sort it, etc).
  8. If you google code phpBB or phpNuke you'll find that they use a pretty nifty regex pattern replace to handly their smileys.
  9. If you have access to add events to the crontab on the server you are running your website on you can make is execute a stand alone php script once a month. The crontab is normally located at /etc/crontab Read this: [url=http://www.adminschoice.com/docs/crontab.htm]www.adminschoice.com/docs/crontab.htm[/url]
  10. Ok... calm down and don't panic. I'll need a little more information. Is there an error message to go with this? Are you running in windows / solaris / linux / etc? You most probable problem is your first line: [code]$uploaddir = "/".$countryList."/";[/code] try replacing it with: [code]$uploaddir = $countryList."/";[/code] Alternatively check your permissions on the folder in question.
×
×
  • 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.