Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers!
/Peo, FreeWebSpace.net
utopia is evil
i coded dystopia (www.woofcat.com/dystopia) which is much better... but i'm not giving away the source (unless you want to offer $$$?) :)
utopia is coded in delphi btw... dominion is asp...
no, php is is much easier... and the person asked for a php solution, not your biased opinion on which language is better.
<?
$file=file('links.txt');
foreach($file as $x)
{
$x=explode('=',$x);
if $go==$x[0]
{
header('Location: '.$x[1]);
exit;
}
}
header('Location...
though if what you're trying to do is check what kind of image a file is better than checking the extension would be something like:
if($x=@getimagesize($url))
{
switch $x[2]
{
case 1:
do function gif;
break;
case 2:
do function jpg;
break;
case 3:
do function png;
break;
case 4...
why create new variables and use array functions to parse a simple string?
$url = 'http://somerandomlocation.com/blahblah/file.ext';
switch(substr($url,strrpos($url,'.')+1))
{
case 'gif':
do function a;
break;
case 'jpg':
do function b;
break;
default:
do function c;
}
what do you mean a free smtp server? don't just about all hosts have sendmail going? unless you mean an open smtp relay which i doubt anyone is stupid enough to advertise...
in php at the top of the page put:
<?$t=time();if(empty($pop)||$pop<$t-86400)header('Set-Cookie: pop='.$t.'; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/');else $t=0?>
and where your ad code is use:
<?if($t){?><SCRIPT LANGUAGE="JavaScript"...
the setcookie() function has problems with some browsers, so i'd recommend doing them yourself with header() instead...
header('Set-Cookie: cookie=whatever; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/');
would set $cookie to whatever... and stay even if browser is closed (until jan 19...
yeah but last time i was back i changed the email in my profile and it never send me the email to verify it so my return was pretty short lived... vbulletin is so annoying, don't know why people like it so much... hmm...
well of course there is no query string "function," and if your php config is fully optimized like mine there is no $QUERY_STRING variable either... best to use getenv()... and readfile() is more efficient than include() (and closer to what the original perl script does)...
Just change that field to an int type...
Not very efficient but after you delete an entry you could do something like:
update table set field=field-1 where field>deleted