cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I'm no translator but I think that website is in Arabic. Impossible to read or understand. As for the question, the only oop I currently use is in php-gtk but hope to learn more soon. Also anybody who knows websites that give tutorials on oop would be good as this appears to be an open php oop topic and I would be interested in learning at least the basics of oop in a non-gtk environment (regular php5).

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The following should do the trick the the result being in the $res array

<?php
$var=$_POST['box'];
$i=1;
$res=array();
$var=(empty($var))?array():$var;
foreach ($var AS $val) {
    $n=substr($val,-1);
    while ($i<$n) {
        $res[]=false;
        $i++;
        }
    $res[]=$val;
    $i++;
    }
while ($i<=5) {
    $res[]=false;
    $i++;
    }

?><form method="POST">
<table>
<tr>
<td><input type="checkbox" name="box[]" value="box1"/></td>
<td><input type="checkbox" name="box[]" value="box2"/></td>
<td><input type="checkbox" name="box[]" value="box3"/></td>
<td><input type="checkbox" name="box[]" value="box4"/></td>
<td><input type="checkbox" name="box[]" value="box5"/></td>
</tr>
</table>
<input type="submit" value="Send">
</form>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have heard that the first prize is a weekend at a secret location. The second prize is a whole week at the same secret location.

Is that secret location daniweb lol ;)

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Okay... we are missing a major point here. Mars is way too far away. When we discovered water on mars, it was the remains of ice lakes. Mars is cold, very cold. If we went to mars, the new problem would be global cooling. In a massive scale.

If mars has global cooling then we can pollute the planet with the carbon we are using on earth. So polluting the planet would be a good thing on mars as it would sent temperatures to something reasonable.

Uhh no. Man is nowhere even close to teleporting an apple, let alone a planet. You're delusional. Also, I'm not a physicist, but I read that article, and they didn't teleport anything in the sense you are implying. They 'teleported' it in the sense that they were able to duplicate a property of the particle, not the particle itself. The article says that they are planning to use it in communication, not that they think it is a breakthrough in the future of teleporting Mars.

However experiments have already successfully teleported the first particle. Although they haven't figured out how to piece together the particles in the right order I believe in another 10 years that will change as hard work is being done on it with great success.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

So i think we really have just this one chance, so rather than spend trillions of dollars trying to move our planet. Why dont we spend that money fixing what we have now?

Well the problem with that is the governments do not believe there is global warming so soon we will be swimming from one building to another instead of driving. So if nobody can admit to the problem (global warming) then how do you expect them to fix it. Very few governments or politicians have admitted to global warming none of which are taking much action. So you have to face the earth is doomed.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

You gotta' read the whole thread. You're just like the blind men and the elephant.

I have already read the whole thread but are you saying that since Mars is too far away to get to we should teleport the planet closer so it will be just as accessible as the moon. I don't think very many scientists would be keen on doing that as it would affect Mars orbit.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

So, how do you move something the size of a planet?

Teleportation. Scientist have already teleported the first particle. So the technology is going to be available in about the next 10 years so you could just teleport the planet. But why would you move mars or any planet. Mars is fine where it is.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If time has no start and no end, what was before the Big Bang?

If you checked the video in post #1 there was god and his room mate shugs. They were arm wrestling and god was loosing so god did a fart. Then god won. Then god was about to do a second fart got a match and lit it behind him and did a fart which created the two gas particles and exploded to create our universe.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

What would the advantages be to live on mars?

Then planet is about polluted with global warming making earth unlivable so the temperature would be a lot better on mars if in the next 50 the earths temperature is meant to rise over 7 degrees. So one day earth will be so warm that humans can no longer live on earth which means we will need to move to another planet. That is if the theories of global warming are correct which I don't believe.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Although I rarley use that method to login I too find it annoying it doesn't work as every so often I forget that method doesn't work and get caught by the bug. Please fix dani.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Where's the forum with the clever people who can help with difficult technical challenges?

Well your posting in it. Also I believe it will be another 291 years before we see humans living on mars - year 2300. Hope to see you then.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Having dinner with friends who I only see on Xmas and Independence Day. I love them dearly but they have 3 kids and no time for us - life can be like that sometimes.

Independence Day? Is that the day where the aliens try to take over the world. When we would not give up without a fight. When we would not sleep quietly into the night. When we were going to live on and survive. At least that is what the movie says so did they name a day after that movie. That would be cool.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

What do you want to receive this Christmas? Why?

I want to receive two copies of the latest super computers. A few TB of ram will do the job. Why? So I can calculate pi to the last digit and make my games run faster. G' I would have fun with a few super computers.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

There are villains about and they want to suck your universe.

I know. When it's time lets move to another universe where there are no black holes. Now that's an idea.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Also if you want columns in the array then a 2 dimensional array will be required. For example

<?php
$htmltable=array();
for ($row=0;$row<21;$row++) {
    for ($column=0;$column<6;$column++) {
        $htmltable[$row][$column]=$row.'x'.$column; //cell value;
        }
    }
print_r($htmltable); //dump array
?>

I haven't tested the above script but gives you an idea of how to generate an array with a table like structure.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Have you tried the youtube video player. Simply copy and past the code shown to the side of a youtube video and you can view that video on your site. Only problem is that method is the video must be uploaded to youtube.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Big Bangs happen all the time. We are just too far way to observe them. I wonder what the opposite of a Big Bang is?

Wouldn't the opposite to the Big Bang be the Small Silence. At least that is the opposite of those two words.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Is this a question? What do you want? Have you contacted the host? If you see php code you've probably not enclosed the code inside php tags or perhaps your hosting account does not support php.

Exactly and in addition to that your host may have turned off short tags in the php.ini file so you might need to use the full <?php .

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

No.
The Google OS hasn't even got the drivers for a harddrive. So basically Googles OS has 1992 technology (No hard drive and no cd rom just a flash drive) and should be put in a museum. And what is this about Googles OS can only run Crome. You cannot install Firefox or any other browser on googles Operating System. Didn't Microsoft get into huge trouble about that with the Europeans with Internet Explorer. So theoretically Googles OS cannot be sold in Europe!

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

except you didn't change the extension. For example to include the javascript file you should use the following:

<script type="text/javascript" src="xyz.php"> </script>

Then in xyz.php you can process the javascript to your likings and even use something like the following method to include the javascript file.

<script type="text/javascript" src="xyz.php?id=1835&var=true"> </script>

So that way php code will work in the javascript file if that is what you want.


However if you want to include php functions and not javascript function into the php file such as custom defined php functions then the following is what you would use.

<?php
include('functions.php'); //no javascript
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Simply give your javascript file a .php extension then php code may be used in the file. So for example your filename may be scripts.php and will display all of the required javascript using php.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

This is the default behavior, yes, but you can change it. See: 13.6.2.1. Using Per-Table Tablespaces
And this is only relevant to InnoDB tables. MyISAM tables are each stored in three separate files, so this in no way applies to them.

I see how that can be handy but another thing I have noticed with sites like google and youtube is that they seem to redirect users to their country code domain meaning there is a separate database for each domain is different. Perhaps that is the more efficient way of dividing the content. Example: http://au.youtube.com
However from reading what Atli has to say using correct mysql methods with many tables should also do the job.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Just wondering what other programmer do in their free time.

Well in my free time I program all sorts of things. One of my latests projects that I have done is a dehasher. The more cpu you have the more you can dehash in shorter time. A project I am working on is a programming community dedicated to gamemaker (gml). Hopefully will be finished by the time gamemaker 8 is released.

And most importantly in my free time I like to help out on daniweb.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

They can be very useful for websites like Wikipedia and YouTube, who's content is generally pretty static, but aren't really of much use to websites like Facebook, who's content changes on pretty much every request.

Just a note on that. Wikipedia receives 1,000 new articles every day and many more edited articles so it is possible to compare Wikipedia to ever changing websites such as Facebook. I guess it is a matter of personal preference but to me it doesn't make much of a difference because the data is still stored in the same source file. That is each database has a separate file and so having a separate table will not make a too greater difference if it needs to search from a list of a million tables. So as I said the decision of this section of database design is personal preference as both ways have their advantages and disadvantages which equal out to be the same.

Just something I should have said earlier...
If placing all the data in one table, it is often best to put the big column and a few identifiers in one table then the rest of the columns in another table and use join statements instead of having all the columns in the one table. So Basically there would be two tables one with the page data and the other with little bits of info and this can speed things up when you only need the little bits of info. …

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Didn't realize you were trying to get those two variables to work but the data from the result is stored in the $data variable and should be possible to use the preg_match_all function to find the appropriate section of data.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try this:

<?php
// create a new cURL resource
$ch = curl_init();
$demo='http://chaitu09986025424.blog.co.in/feed/rss/';
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://validator.w3.org/feed/check.cgi?url=$demo");
curl_setopt($ch, CURLOPT_HEADER, false);

// grab URL and pass it to the browser
$data=curl_exec($ch);
echo $info['http_code'] . " " . $http_codes[$info['http_code']];
// close cURL resource, and free up system resources
curl_close($ch);

//$data
//contains the result
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Now it throughing this error..

Unknown column 'id_tariffplan' in 'where clause'

That is a basic mysql error which means mysql has been told to search for a column named id_tariffplan however no such column exists. A common problem for this is mis-spelling the column and not having the column inserted in the first place.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

But those are extreme cases. Only apply to people that measure the hourly database size increase in Terabytes :-)

Are you at all familiar with the mediawiki cms. That is the same cms wikipedia uses and it does not spread into millions of tables. Instead it has hundreds of computers that just process the database. These are known as cache servers. So try downloading mediawiki and see how wikipedia does it and you will find there is only one table and joins are used a lot to save space. So wikipedia only has the one table for storing all articles and that can be confirmed by checking the mediawiki cms so I would recommend doing the same.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Here's a script from this article.

<?php
$pages_left=3;
$pages_middle=4;
$pages_right=2;
 
$total_pages=100;
if (!isset($_GET['page']) && empty($_GET['page'])) {
$currentpage=0;
} else {
$currentpage=$_GET['page'];
}
for ($p=0;$p<=$total_pages;$p++) {
    if ($p<$pages_left || $p>=($total_pages-$pages_right) || ($p>=($currentpage-floor($pages_middle/2)) && $p<=($currentpage+floor($pages_middle/2)))) {
        if ($p==$currentpage) {
        echo ($p>0)?' - ':'';
        echo '<b>'.($p+1).'</b>';
        } else {
        echo ($p>0)?' - ':'';
        echo '<a href="index.php?page='.$p.'"><b>'.($p+1).'</b></a>';
        }
    }
}
?>
kvprajapati commented: Great! +6
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hey.

In a properly designed CMS, changing anything just INSERTs, UPDATEs or DELETEs stuff from the database. If it is actually creating tables, or otherwise changing the database structure, there is usually something wrong with the database design.

Exceptions to this are webs with insane numbers of visitors, where the tables get so big they become unmanageable and start affecting performance. (I'm talking here about websites the size of Facebook or the WordPress blog. If you are wondering if this applies to your web, it almost definitely doesn't ;-P)

But yea, not really knowing much about the WordPress system itself, I would suspect that adding a page just INSERTs a row into a "page" table somewhere, and the contents of that page get inserted with it, or into a table related to it.

Well actually I have been told in the mysql forum that if you design a table so that it has indexing you shouldn't ever need multiple tables for the one job. That is when designed properly because with table indexing it can make the difference between minutes and milliseconds for a mysql query however will take up additional space. In case you don't know what table indexing is table indexing is one of the options when creating each table column in phpmyadmin.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

but how google handles a single account for multiple sites.......!!

Well cookies are designed to serve one domain only and google's login uses Java applets. So perhaps with googles login their Java applet could write to a file on the local system or something like that but this obviously doesn't suit your situation as you want php (The server side and not client side). Could you post your login script and show in a code box your database structure (column names and tables) as I shall help you code this multi site login.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Cookies and sessions won't work because they are separate domains so I would suggest having them both read a common mysql database where user data will be stored so when a user logs into each, their preferences+passwords will still be the same as the other site. If however you do not want the user to have to log in twice then when a user logs in record their ip address in the user database and when the user visits the second site, the second site will check if the users ip is in the database and if it is it will send a cookie.

Sorry if that is too brief but there is so much to explain in so fewer words...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

This morning I woke up and went to my computer like normal and saw a boolean message saying my harddrive has limited space. So I went to the Windows Explorer and check drive C properties and it said I had zero bytes of free space. I thought ok, maybe I have a virus or that dehashing table cron job might have a slight effect on it. So I tried a virus scan and there wasn't enough free space to do a virus scan. So to gain some space I emptied the mysql dehashing database as it could easily be repopulated and my computer froze for a little while. After that my computer started responding and I check the free space on my computer then suddenly I had 116GB of free space. This database was just for a reverse lookup of hashes that has been populating 24/7. Didn't realize it would populate so fast as I only want to upload 25GB of that database. The rest was there for nothing. Now I can use the computer like normal and I learnt the hard way I need to have a space validator on my script.

Thought I would share this story just like the one where a person put their credit card in a floppy drive to make a payment.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Favourite movie of all time is a toss up between Back To The Future and LOTR (Return of the King)

If you like back to the future and are Aussie then you will lovethis youtube clip. It is one the chasers war on everything made when John Howard was Prime Minister just before he lost the election and if only Mr Howard went back in time he would still be Prime Minister today lol. Was laughing tears when seeing that again. lol Just like the apec.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Has anybody seen the video linked to in the first post?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The only other option is the below. If that doesn't work then it means there is something wrong with the apache httpd.conf file. I have experience that myself but can't find how to configure it properly.

RewriteRule ^/?user/([a-zA-Z0-9_]+)/?$ /profile/?uname=$1 
RewriteRule ^/?user/([^a-zA-Z0-9_]+)/?$ /index.php

As I understand there are little recourses regarding this error available but if the above doesn't work its likely to be an apache configuration problem. I'm only good a tweaking apache and not fixing it.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

i'm developing the website. i'm doing this in my computer's server, using localhost. i'm using windows xp.
i checked the location. it's correct.
what to do?

Just saw on your first post it is http://localhost/user/jack
Try the following although there are a number of possibilities for this error...

RewriteRule ^/?user/([a-zA-Z0-9_]+)/?$ /profile/?uname=$1 [NC,L]
RewriteRule ^/?user/([^a-zA-Z0-9_]+)/?$ /index.php [NC,L]

also try

RewriteRule ^/?user/([a-zA-Z0-9_]+)/?$ /profile/\?uname=$1 [NC,L]
RewriteRule ^/?user/([^a-zA-Z0-9_]+)/?$ /index.php [NC,L]
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try to make sure that it rewrites to the correct location. So could you provide a url link to your php page mentioned in your htaccess file including domain and all.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try this

RewriteRule ^user/([a-zA-Z0-9_]+)/?$ profile/?uname=$1 [NC,L]
RewriteRule ^user/([^a-zA-Z0-9_]+)/?$ errorpage.php [NC,L]

And don't forget to make that error page.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

i used the code you submitted, but still the problem exists.
when i use any of %,<,>,\,", * or : it's showing error

Shouldn't those symbols be encoded. Try using the php urlencode function on those symbols to see what the translation should be. That would be the most likely solution because such symbols can't be entered into the url so instead there are codes that are entered which translate into those symbols.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

You can take a look at this thread for a script that already has some of those abilities programmed in. But there would be a lot more programming to add in. Alternatively there is a script I once used called Sphider which does exactly what you ask but I find hard to edit.

kvprajapati commented: Great script, Indeed. +6
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Why should anyone care what you believe?

I didn't say anyone had to care about what anybody believes but this topic is to share around ideas of how the universe was created.

That size defeats us.

I'm not sure exactly what that means.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi and have been thinking about the big bang and wonder how did it all really start. Was it really like this theory or the effect of somebody doing an intergalactic experiment in the parallel universe. So many theories some based on science some based on religion and yet there seems to be no true answer. Most scientists say it started with two gas particles colliding at supersonic speeds. However how were these gas particles created - perhaps by god farting.

I believe in the theory of gods fart created the universe where in the Pegasus galaxy life was immediately created and that life (Atlantians) explored the universe creating other species and Stargates that the US is probably hiding or hasn't found then life from the Pegasus galaxy had eventually been transfered to Earth via Stargate. Also since the universe is always expanding you will find that the universe would have been relatively small back then. So what is your theory?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

My favorite movie is Titanic 1997 as it shows how even the best technology can fail on us all. Next best movie is Stargate Atlantis as we all descended from the Atlantians at the Pegasus galaxy. At least that's what I believe in because it's more possible than a single creator and I believe that civilization who created life on earth was the Atlantians from Atlantis. Anyways back on topic the next favorite movie is The Dish based on the radio telescope in Parks Australia which tracked the Apollo 11 during it's mission to the moon. And although I have many others on my list those are the basics.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try perhaps this:

RewriteRule ^/?user/([^\.]+)/?$ /profile/index.php?uname=$1 [NC,L]

Also the second part the is where to needs to specify then entire address after the domain so for example the above code assumes the php file is located at yoursite.com/profile/index.php?uname=xxxxx

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Although you could use regex it would be better to use the following:

$url='http://www.youtube.com/watch?v=NMAYr709-9Y&feature=dir';
$var=explode('?v=',$url);
$var=explode('&',$var[1]);
echo $var[0];
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

To explain how this is done:

First you make a http request to the page you want to parse.

eg:

$url = 'http://example.com/';
$content = file_get_contents($url);

Then you parse the HTML. A good option is using DOMDocument.
http://docs.php.net/manual/en/domdocument.loadhtml.php

The loadHTML() function of DOMDOcument will parse HTML into a DOM Tree. You can then use DOM methods, or hand the DOM over to SimpleXML if you find that easier.

$url = 'http://example.com/';
$content = file_get_contents($url);
$Dom = DOMDocument::loadHTML($content);
// you can traverse the DOM
$Xml = simplexml_import_dom($Dom);
// or use the simpleXML methods, which may be simpler

You can also just use regular expressions.

$url = 'http://example.com/';
$content = file_get_contents($url);

// parse what you want with a regular expression
$regex = '/href=["\'](.*?)["\']/i';
preg_match_all($regex, $content, $matches);

var_dump($matches);

The reason why my script is a little more complex than that is because the script I wrote scans every page in the website specified. So in other words it will go to the specified page, grab all the links then do whatever it needs to do with the page then start to loop through the same process with all of the internal links it finds in the website. Also you may want to note that the regex should really be as follows:

$regex = '/(href|src)=["\'](.*?)["\']/i';
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have a template that I can give you and it is as follows:

<form method="post">Scan site: <input type="text" name="site" value="http://" style="width:300px">
<input value="Scan" type="submit"></form>
<?
set_time_limit (0);
if (isset($_POST['site']) && !empty($_POST['site'])) {
/* Formats Allowed */
$formats=array('html'=>true,'htm'=>true,'xhtml'=>true,'xml'=>true,'mhtml'=>true,'xht'=>true,
'mht'=>true,'asp'=>true,'aspx'=>true,'adp'=>true,'bml'=>true,'cfm'=>true,'cgi'=>true,
'ihtml'=>true,'jsp'=>true,'las'=>true,'lasso'=>true,'lassoapp'=>true,'pl'=>true,'php'=>true,
'php1'=>true,'php2'=>true,'php3'=>true,'php4'=>true,'php5'=>true,'php6'=>true,'phtml'=>true,
'shtml'=>true,'search'=>true,'query'=>true,'forum'=>true,'blog'=>true,'1'=>true,'2'=>true,
'3'=>true,'4'=>true,'5'=>true,'6'=>true,'7'=>true,'8'=>true,'9'=>true,'10'=>true,'11'=>true,
'12'=>true,'13'=>true,'14'=>true,'15'=>true,'16'=>true,'17'=>true,'18'=>true,'19'=>true,
'20'=>true,'01'=>true,'02'=>true,'03'=>true,'04'=>true,'05'=>true,'06'=>true,'07'=>true,
'08'=>true,'09'=>true,'go'=>true,'page'=>true,'file'=>true);
 
function domain ($ddomain) {
return preg_replace('/^((http(s)?:\/\/)?([^\/]+))(.*)/','$1',$ddomain);
}
 
function url_exists($durl)
		{
		// Version 4.x supported
		$handle   = curl_init($durl);
		if (false === $handle)
			{
			return false;
			}
		curl_setopt($handle, CURLOPT_HEADER, true);
		curl_setopt($handle, CURLOPT_FAILONERROR, true);  // this works
		curl_setopt($handle, CURLOPT_HTTPHEADER, 
Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") );
		curl_setopt($handle, CURLOPT_NOBODY, true);
		curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
		$connectable = curl_exec($handle);
		curl_close($handle);  
        if (stripos(substr_replace($connectable,'',30),'200 OK')) {
            return true;
            } else {
            return false;
            }
		}
 $fdata='';
//below function will only get links within own domain and not links outside the site.
function getlinks($generateurlf) {
    global $formats;
    global $f_data;
    $f_data=file_get_contents($generateurlf);
    $datac=$f_data;
    preg_match_all('/(href|src)\=(\"|\')([^\"\'\>]+)/i',$datac,$media);
    unset($datac);
    $datac=$media[3];
    unset($media);
    $datab=array();
    $str_start=array('http'=>true,'www.'=>true);
    foreach($datac AS $dfile) {
        $generateurle=$generateurlf;
		$format=strtolower(preg_replace('/(.*)[.]([^.\?]+)(\?(.*))?/','$2',basename($generateurle.$dfile)));
        if (!isset($str_start[substr_replace($dfile,'',4)])) {
            if (substr_replace($generateurle,'',0, -1)!=='/') {
                $generateurle=preg_replace('/(.*)\/[^\/]+/is', "$1", $generateurle);
                } else {
                $generateurle=substr_replace($generateurle,'',-1);
                }
 
            if (substr_replace($dfile,'',1)=='/') {
                if (domain($generateurle)==domain($generateurle.$dfile)) {
                    if (isset($formats[$format]) 
                        || substr($generateurle.$dfile,-1)=='/' || substr_count(basename($generateurle.$dfile),'.')==0) {
                        $datab[]=$generateurle.$dfile;
                        }
                    }
                } else if (substr($dfile,0,2)=='./') {
                $dfile=substr($dfile,2);
                if (isset($formats[$format])) {$datab[]=$generateurle.'/'.$dfile;}
                } else if (substr_replace($dfile,'',1)=='.') {
                while (preg_match('/\.\.\/(.*)/i', $dfile)) {
                $dfile=substr_replace($dfile,'',0,3);
                $generateurle=preg_replace('/(.*)\/[^\/]+/i', "$1", $generateurle);
                }
                if (domain($generateurle)==domain($generateurle.'/'.$dfile)) {
                    if (isset($formats[$format]) || substr($generateurle.'/'.$dfile,-1)=='/' 
                        || substr_count(basename($generateurle.'/'.$dfile),'.')==0) {
                        $datab[]=$generateurle.'/'.$dfile;
                        }
                    }
                } else {
                if (domain($generateurle)==domain($generateurle.'/'.$dfile)) {
                    if (isset($formats[$format]) || substr($generateurle.'/'.$dfile,-1)=='/' 
                        || substr_count(basename($generateurle.'/'.$dfile),'.')==0) {
                        $datab[]=$generateurle.'/'.$dfile;
                        }
                    }
                }
            } else {
            if (domain($generateurle)==domain($dfile)) {
                if (isset($formats[$format]) || substr($dfile,-1)=='/' || substr_count(basename($dfile),'.')==0) …
nav33n commented: nice! +5
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

When you program a computer game based on a dream you had...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I agree. It "feels" much quiter than normal. Not so many questions get posted as normal. I miss my challenge to try and answer those questions.

mmmmmmm. Maybe holidays started earlier....

I agree because I used to solve questions like crazy in the php forum but now there are fewer questions that are not already solved by another member. I hope this doesn't spell the beginning of the end of daniweb. That would be very bad. :(