redbullmarky
Staff Alumni-
Posts
2,863 -
Joined
-
Last visited
Never
Everything posted by redbullmarky
-
how to get dynamic dns server ip address?
redbullmarky replied to bilis_money's topic in Miscellaneous
try (if on a Windows box) opening up a command line (Start->Run->cmd) and typing: ipconfig /all -
just the site you need: http://www.vixy.net/ not sure whether it works on ALL video sites, but most vids you can find on youtube or one of the other big ones anyway. pop in the URL, select your download format, and Bob's your Uncle
-
[SOLVED] Password Protect PHP adding a second user?
redbullmarky replied to aiden857's topic in PHP Coding Help
try: <?php // Define your usernames and passwords $users = array( 'someuser' => 'somepassword', 'someuser2' => 'somepassword2' ); $username = $_POST['txtUsername']; $password = $_POST['txtPassword']; if (isset($users[$username]) && ($users[$username] == $password)) { ?> <p>This is the protected page. Your private content goes here.</p> <?php } else { ?> <h1>Login</h1> <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p><label for="txtUsername">Username:</label> <br /><input type="text" title="Enter your Username" name="txtUsername" /></p> <p><label for="txtpassword">Password:</label> <br /><input type="password" title="Enter your password" name="txtPassword" /></p> <p><input type="submit" name="Submit" value="Login" /></p> </form> <?php } ?> personally though, it's a pretty awful login script for anything more than extremely simple. Employing a database of some form would be your best bet - there are plenty of tutorials (on both this site and via Google) not to mention the fact that it's much easier to deal with adding more users when the details aren't hard coded into the page. Cheers -
[SOLVED] Password Protect PHP adding a second user?
redbullmarky replied to aiden857's topic in PHP Coding Help
aiden857 - do NOT post the same topic more than once, never mind 4 times. It's more likely to annoy than to get help, not to mention it being against the forum rules. i've merged them all into this one. in future, please find the most suitable place and post it just once. Cheers -
looking good so far! i'll have a good dig though, this is definitely an interesting one. i wondered how long before you did this one anyway! ps i've sent you an email as i'd be pretty keen to see how it works
-
they're both popular enough to have audience members that have access to the videos
-
[SOLVED] Selecting values that are not null
redbullmarky replied to Richzilla's topic in PHP Coding Help
even shorter, you can generally get away with just: <?php if ($download1) { } ?> which will handle empty, null and zero values for $download1 -
what code have you tried yourself? if you wish to get someone to write the complete code for you, consider getting some paid help via the Freelance forum. This forum is to get help on code you've written yourself
-
[SOLVED] header function not sending
redbullmarky replied to soycharliente's topic in PHP Coding Help
reusing code is far from bad, as long as it does the job initially. over time your collection of scripts/functions/classes will grow and change as you find other uses/fixes, etc for them -
or when your keyboard has been ejected through a hole in the window, depending on what sort of drunk you are...
-
drunk = forget it and go to sleep. you'll just break things. or just go back to the pub. just a beer or two while you work = relaxing and can sometimes actually help, especially when thinking "outside the box"
-
is it a draft or will you be putting content into it from here? overall, i think it looks ok - but you're using too many images to form the layout instead of CSS - for example, you have one image that's purely just a big black square (background of the left panel) yet it comes in at the best part of 17k. (unless this has just so far been sliced up in PS/Fireworks? in which case just ignore me ) overall, you could do worse than going through the images and just being aware of how big they are and optimizing them. the smaller the file sizes that form the page, the quicker it loads
-
yep. this forum is to help with code you already have, not code you want others to write for you. we all (including those that could help) have to start somewhere - and tutorials and the manual are as good a place as any. as frost said - if you want the script written for you, post in the freelance forum for paid help.
-
erm...am i right in thinking that "nulled" generally means "get it for free, sod the copyright" ? In any case, with stuff like SMF (and possible phpbb3 - i've yet to see) about that you can get for free and install easily, with a huge community, frequent updates, free support, etc - i honestly can't understand why anyone would ever go down the vBulletin/Invision route again. as for my avatar - don't even go there. My Angry Kid icon is there to stay, I could bet my left nad on it
-
haha if only all examples were like that...
-
javascript would be the only way. so if javascript can't do it - then you're out of luck. many of the function keys are hard programmed into the browser (eg, F3 for search, F5 for refresh) - so even if it was possible, many people (myself included) wouldn't be a fan of anything that removed "the norm" behaviour. try access keys instead, with the accesskeys using the regular numbers. eg <a href="home.php" accesskey="1">Home page</a>
-
whoops my bad. forgot to escape the first $ (note it's now \$result instead of just $result): <?php // slight mod to your string $firetemp="\$result = 100{$sign[1]}{$random[1]};"; eval($firetemp); echo $result; ?> also, it's not always essential but a good habit to get into when enclosing vars in a string to be parsed, to include them within curly braces {}. this makes sure that there's no clashes between the var name and any surrounding text.
-
*raises hand* though only for little bits and pieces.
-
might be worth looking into template engines. Smarty is one, or if you wanna build your own simple version: http://www.massassi.com/php/articles/template_engines/ good luck!
-
moved here from PHP Help as some of the people round here might have a different take on things
-
/'s enclose the regex statement. the caret (^) signifies that we're looking from the start, the $ signifies the end of the string. so in English, the regex says: from the start of the string to the end, find 2 numbers that can't be both zero, as well as 2 further numbers. in all, find 4 numbers. (i think lol) there's a board specifically for regex here - some of the posts/stickies may be of assistance. in my case, regex is very much about trial and error as opposed to actually knowing
-
that'd be a javascript thing, if anything...
-
had a quick play with it. not properly tested and very messy, but seems to work..? <?php $result = preg_match('/^(([0-9][1-9]|[1-9][0-9])[0-9]{2})$/', $input, $matches); ?> which (i think) checks the first 2 digits to make sure that at least one of them is greater than 0 (1000 or 0100, for example) seems to do everything you want.