samarudge 16 Posting Whiz

Try something like this:

$Fifteendays = 60 * 60 * 24 * 15;
//Seconds X Minutes X Hours X Days
$Infifteendays = time() + $Fifteendays; //Unix time
//Add it to the current time
echo $Infifteendays;

//Or in 'Pretty' time
echo date("M d Y H:i:s",  $Infifteendays);
samarudge 16 Posting Whiz

On behalf of all the comunity at Daniweb, WTF???
Explain your question more clearly please

samarudge 16 Posting Whiz

I like the idea i mean the more platforms an app supports the more popular it would be but you could always run PHP as a CGI module under IIS?

samarudge 16 Posting Whiz

There are many problems with that.
1 - Unless you spacificaly tell it, PHP will wait till the end of the script before sending ANY information to the browser so that script would not be sent till after 3 seconds.
2 - If it was shown then header() would not work as headers need to be sent before any data.
3 - Most browsers (IE, Netscape/firefox etc) only update the display every 100bites or so

Try this

<?php
header("Refresh: 3;URL=movie_registration.php");		
echo "Your username and password do not match our records";
?>

This will display the page but tell the browser to refresh after 3 seconds to the new page
Regards,
Sam Rudge

JimD C++ Newb commented: Perfect solution to my problem. Thank you! +1
samarudge 16 Posting Whiz

I like AceBackup if you're looking for a free solution but if you want absolute simplicity and don't mind paying a bit Google NTI Shadow

samarudge 16 Posting Whiz

Have a shared network drive on the server people could save to. Also, now this might be complicated, if you are using IE then maybe you could develop some sort of Active-X control?

samarudge 16 Posting Whiz

Well their is still nothing you can do to stop it, and whether your selecting the page to display in the frame or your users are you would still need permission to do this.

samarudge 16 Posting Whiz

Also you should insert some security as users could SQL inject into your database.

samarudge 16 Posting Whiz

SimpleXML (Google it)
Its simple and it handles XML files :P

samarudge 16 Posting Whiz

I have a CPU monitor on the servers LCD pannel which says usage is at 92-95 percent and all that is using CPU in task manager is SIP. I can also change where the fan comes on between 10% CPU and 80% CPU, Nothing else triggers it.

samarudge 16 Posting Whiz

Its just Javascript, there is nothing you can do to stop it without serious modification to the users browser or changing the source of the page. To quote from almostbob

stop stealing other sites' content,
stop stealing other sites' bandwidth,

If it was my site you were stealing from I would be really P***ed off with you. Just don't be so stupid and write your own content. Its called web DEVELOPMENT which implies that you actual develop something rather than just nicking other peoples stuff.

samarudge 16 Posting Whiz

Hi,
I would like to point out that I am not stupid and do understand the principal of SIP and that it is not using up my system resources but on my new server their is a fan that activates when CPU usage runs above 80%. Every 10 mins or so the fan will come on with no processes running (Just about 92% SIP) now this wouldn't be a problem normal but the server is in the corner of my room and it's keeping me up at night. Is their any way to get SIP to not go above 80% (I don't mind if 'useful' processes go above this but just not SIP at random times for no reason.
Regards,
Sam Rudge

samarudge 16 Posting Whiz

The easiest thing to do would be

<form action="<?php
echo "http://".$_SERVER['HTTP_HOST']."/contact.php?go=true";
?>" method="post">

Then the form would always be the site that was being accessed

samarudge 16 Posting Whiz

Also by compiling it into one script the file size is huge and it will take PHP a much longer time to parse the whole file

samarudge 16 Posting Whiz

Most modern mailcenters use highly advanced filters. They can find out the domain that the email was sent from and as it is a H-o-t-m-a-i-l (Sorry, school pr-o-xy blocks) address in the from field they would be able to tell that the message did not come from their own servers. It is best to have the email coming from your SMTP domain to ensure your message is marked safe so if your SMTP is at smtp.mydomain.com you email address would need to be some_address@mydomain.com. If you use your ISP's SMTP then it would need to come from their domain E.G. I use Virgin Media's SMTP server so my emails come from samaruge@virgin.net
Some servers will block your message completely in a case like this.

samarudge 16 Posting Whiz

I don't think you can use HTML tags in Javascript code with IE

samarudge 16 Posting Whiz

Look up mod_backhand for Apache

samarudge 16 Posting Whiz

Hi,
Thanx almostbob, although your solution didn't actualy solve the problem, you helped me find out how to fix it myself.

samarudge 16 Posting Whiz

Hi,
I have the following Javascript code for loading my Google custom search:

Search = '<form action="http://www.ututorial.net/search" id="cse-search-box"><div><input type="hidden" name="cx" value="partner-pub-3996237323979957:tenb6ft9bbh" /><input type="hidden" name="cof" value="FORID:10" /><input type="hidden" name="ie" value="ISO-8859-1" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>';
function set() {
	document.getElementById('Search_Content').innerHTML = Search;
}

This works fine in Firefox but in IE i get 'error on page' warning and the box doesn't load. Is this a bug in IE or a code problem?
Regards,
Sam Rudge

samarudge 16 Posting Whiz

Oh we have stupid net admins :P I found it out though after about 5 days.

samarudge 16 Posting Whiz

Hi,
I have absolutely no clue where to go with this so any ideas would be useful.
I want a user to be able to take a screen print and then paste that directly on to the page and upload it to the server. I'm fine with the PHP bit to upload the image its just the client side script to get the image from the clipboard.
Thanx
Sam R

samarudge 16 Posting Whiz

Why not just use FLV? its a lot simpler and will work in Firefox/Safari as well as IE
P.S. I know you can run WMP plugin in firefox but its an extra download you don't need (Not sure about Safari thoug)

samarudge 16 Posting Whiz

Basicaly if you had a password protected page that called the script to validate the passwords like this:

include('validate_pass.php');

and you accidental deleted validate_pass.php then any user could see your password protected page. However if you used require then the PHP script would not output the rest of the file.
HTH
Sam R

samarudge 16 Posting Whiz

Mail PHP Function
(You would need to be running your own SMTP/Email server though)

samarudge 16 Posting Whiz

Oh by the way CMS is content management system. It is a system where a user could log on and edit the pages of the site without knowing HTML (Much like Daniweb)

samarudge 16 Posting Whiz

How about a site for a bowling alley. People could choose what time they wanted to go and the program could tell them if there were lanes available. It could then select a free lane and create a timetable that could be printed off at the bowling alley for the staff to see. Then you could design a pretty front end for the customer (CSS, JS, HTML etc.) but use your PHP/SQL skills back end.
Hope that helps
Sam R

samarudge 16 Posting Whiz

It would also be useful to people who want to make their code more copyright. It makes it a lot harder to read so it has many uses. I'll look into it. If you want me to email you if I ever get round to doing it just PM me with your email address (Don't be stupid and post it in the forum for all the bots to see :()

samarudge 16 Posting Whiz

Thinking about this and I wanted some oppinions:
mod_minify; An apache module for minifying CSS, HTML and JS without needing PHP scripting!
What do you all think?

samarudge 16 Posting Whiz

PHProxy is a program for accessing blocked internet sites from other places, it is not technical a proxy its just called PHProxy I.E. a proxy caches pages to speed them up, it can also block sites you don't want people to visit.
Try out http://3proxy.ru/
I have never used it but it has great reviews and is avaliable for Linux/UNIX and Windows

samarudge 16 Posting Whiz

Well to start off with it uses a CDN. Something like the webhosts will have thousands of servers all over the world. The will also use compression (Google GZip Apache). As well as E-Tags, Cache Control, Expires and Minified content.
Just look up those things
Regards,
Sam R
P.S. This should have been in the Apache forum really but oh well

samarudge 16 Posting Whiz

your 16? im 17

Awsome

samarudge 16 Posting Whiz

I don't think you can use network backup drives in anything other than business/ultimate. Might need an OS upgrade :(

samarudge 16 Posting Whiz

sorry shoud have refreshed the page !

Just a note I would not have two entries using the same host name.

Yer soz, i wrote that during a Geography lesson and I wasn't thinking propperli :D

samarudge 16 Posting Whiz

Soz ill try that again
replace

<form id="loginForm" name="loginForm" method="post" action="" onsubmit="return validate(this);">

The action will be changed by our javascript then submitted,
Now change your buttons

<input type="Submit" name="Submit" value="Save">
<input type="Submit" name="Submit" value="Submit" >

With

<input type="button" name="Submit" value="Save" onclick="document.loginForm.action = 'save.php';  document.loginForm.submit();">
<input type="button" name="Submit" value="Submit" onclick="document.loginForm.action = 'submit.php';  document.loginForm.submit();" >

What happens is when they click save it changes the action to save.php and submits, the other changes the action to submit.php and submits. This means the form data will be sent to both pages.
Regards,
SR

I tested this and it worked fine. If you have 2 submit buttons without changing the action it will submit to the same place whatever you do

samarudge 16 Posting Whiz

Joomla!!!!!!

I agree, Joomla is my favorite it just takes a bit to get your head round it to start of with but its really easy to configure and use once you know how.

samarudge 16 Posting Whiz

Hi,
I currently run my website off one server (192.168.0.4) and all requests for port 80 (HTTP) are sent to this server. However I want 4 out of 10 requests to be proxied to my second server (192.168.0.3) but I don't want port 80 to map to server 2. I know about mod_proxy in apache but I didn't know how I could use this to split the requests between 2 servers.
I run Fedora 10 and am happy to install software other than Apache to do this.
Regards,
Sam Rudge

samarudge 16 Posting Whiz

Shouldn't this be in the ASP forum? If you want help with JS just post some of the pure HTML, not ASP/VB

samarudge 16 Posting Whiz

If all you want is a blog or simple information page, Wordpress is the way. If you want something more complicated and customisable try Joomla
Regards,
SR

samarudge 16 Posting Whiz

Open Notepad/Wordpad and navigate to
<Your Windows Drive (C:/)>/windows/system32/drivers/etc/hosts
(You might need to change Text Document (*.txt) to all files to see it)
It should look something like this:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

Add this line to the bottom of the file:

127.1.1.1 localhost
so your hosts should look like this:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one …
samarudge 16 Posting Whiz

Soz ill try that again
replace

<form id="loginForm" name="loginForm" method="post" action="" onsubmit="return validate(this);">

The action will be changed by our javascript then submitted,
Now change your buttons

<input type="Submit" name="Submit" value="Save">
<input type="Submit" name="Submit" value="Submit" >

With

<input type="button" name="Submit" value="Save" onclick="document.loginForm.action = 'save.php';  document.loginForm.submit();">
<input type="button" name="Submit" value="Submit" onclick="document.loginForm.action = 'submit.php';  document.loginForm.submit();" >

What happens is when they click save it changes the action to save.php and submits, the other changes the action to submit.php and submits. This means the form data will be sent to both pages.
Regards,
SR

samarudge 16 Posting Whiz

*This was wrong, read the one bellow :(*

Replace

<input type="Submit" name="Submit" value="Save" onClick="window.location.href='save_button.php'" >

with

<input type="button" name="Save" value="Save" onClick="window.location.href='save_button.php'" >

What this creates is a button that does not submit the form just sends the user 2 the right page

samarudge 16 Posting Whiz

Would it not be easyer to use some sort of SQL (MySQL) database?

samarudge 16 Posting Whiz

Yer but im 16 and the only languages I know are PHP, Perl, Python and C# I also think that creating a new user might make them find out. Or proxy is highly monitored.

samarudge 16 Posting Whiz

Hmm, thanx but I already have it generating random passwords. I just wanted it to do an incremental attack. I think I will add all the letters to an array and work from there.
Regds,
Sam Rudge

samarudge 16 Posting Whiz

OK no need to get stroppy, and btw i was able to get 650 attempts per second with my laptop alone and I have 5 exactly the same + a load of friends with laptops who have said they will run the application. Im running it from a command window not through apache or IIS etc. I also know the password begins with H and is 7-10 characters long. I can also access the proxy with my home servers using VPN. Also i dont know any other languages that can process 650 requests per second and not slow or crash the laptops.

samarudge 16 Posting Whiz

Hi,
I am developing a piece of software which is not in any way being designed to hack into my schools proxy server using HTTP auth :P
At the moment I have got it to generate random passwords of a random length, however using this method it is sometimes repeating passwords and there is no logical order to follow. Is there any way to get my PHP app to generate passwords in sequence (I know the passwords contain letters a-z A-Z and numbers 0-9)
a -> A -> b ->B etc.
Then move on to
aa -> aA -> ab -> aB etc.
then
ba -> bA etc
or something like that as in it trys each possible character then adds another character to the string and loops.
Regards,
Sam Rudge
P.S. Never try to hack the admin password for your school proxy, it can get you in a lot of trouble lol :D

samarudge 16 Posting Whiz

Hi,
I have set up Apache on Fedora 9, the server works fine when I open the browser on the Fedora machine and type in localhost/127.0.0.1 but when I type in 192.168.0.3 (The IP of the machine on my network) i get the error:
Failed to Connect
The connection was refused when attempting to contact 192.168.0.3
In FireFox
Any help
Regards,
Sam Rudge

samarudge 16 Posting Whiz

I quite like the new Dreamweaver (CS4) with its code hints and auto formatting, I know its not free but I quite like it. You also get a load of widgets such as menus and it can automatically create AJAX scripts for you. I use notepad++ as the editor on my server though as I think its small and quick to load, ideal for changing a couple of lines or adding that semicolon you forgot :P

samarudge 16 Posting Whiz

AJAX my friend, AJAX all the way :P

samarudge 16 Posting Whiz

Check to see if the other server has PHP GD installed