-
Posts
3,584 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JonnoTheDev
-
Looks like a wordpress template. The colours don't go together - bit random and the naviagtion menus are not user friendly. They disappear when my mouse moves onto the links that appear.
-
[SOLVED] How to remove, or not display, the 0000-00-00 in date fields?
JonnoTheDev replied to sleepyw's topic in MySQL Help
Yes, you should default it to NULL. Make sure the field can contain a NULL. Only defaults to 0000-00-00 if you insert an empty value or an invalid date <?php $created = ""; mysql_query("INSERT INTO table SET created=".(strlen($created) ? "'".$created."'" : "NULL").""); ?> -
The event handler should be onSubmit="return functionName()" withing the form tag. Not an onClick() within the button element
-
Red5 is an open source streaming server http://osflash.org/red5 You don't need flash media server
-
They are grabbing your data. You must stop repeat requests. Invalid user agents. Do some homework.
-
9f65f29197e64cef1f862f359866c3abdc473da40a0efd1f6 bca32fb13cfb5da Susan Boyle to win Britain's Got Talent It's got to be!
-
Load balancing is your next route. Are you sure that your visitors are actually human and you are not being hit by robots. Most of our adult projects get hit by scrapers etc all the time and trapping them is key as they cause huge amounts of server load.
-
Then just salt it. It was created in 1991 (processing power back then was nowhere near the level of today) and in 1996 up to 2004 serious flaws were documented. SHA1 is recomended as oppose to MD5. Wherever you got your initial information from about MD5 people were obviously misinformed and you have taken their view as gospel. Again whatever algorithm you use depends on what you are protecting. MD5 is fine for most websites. People wont spend time trying to crack it. I wouldn't lock my garden shed with a bank vault safe door however a simple padlock will do the job.
-
You never decrypt passwords. You get the password from the username via the db and then encrypt it. If it matches the value you have used to test then it is correct. i.e. 1. send username and encrypted password to server 2. get password record from db using username 3. encrypt password 4. do values match
-
What is your website?
-
Is the project you are working on that big you think that people will actuall spend any amount of time at all trying to crack your hashed/ecrypted passwords? Are you making the next Facebook or Twitter? Maybe cryptogrophy is just a topic you are interested in. Let me say that you could probably store your passwords in plain text and nobody would even bother attempt to gain access to them. Unless you are working on the next goldmine why would anyone rob a bank that has no money!
-
How to post to another server without curl or fsocket
JonnoTheDev replied to t_machine's topic in PHP Coding Help
Curl works over HTTP by the way. Its the main protocol all web requests are made with. Well most of the time unless you are using a different protocol (https, ftp, etc). As far as I know the only method is via stream_context_create(); fopen(); -
Don't make something yourself. Why reinvent the wheel? JPGraph is the most popular library for displaying graphs from data in php. http://www.aditus.nu/jpgraph/
-
Of course you could download direct them if you have the url and path. The website login will not protect anything i.e. http://www.xyz.com/downloads/abc.pdf An .htaccess file with htpasswd will just place a username password prompt to access the folder. You would be forever adding new passwords to the file so this is not a solution. The easiest and most obvious method is to simply move the downloads folder outside of the website document root. This means that they will not be accessible via any url. You would grab the files using your website code (php) and use headers to give the user a download prompt. See: http://www.phpfreaks.com/forums/index.php/topic,252090.msg1183868.html#msg1183868
-
Unlinkely your going to exceed 2083 characters
-
parse xml with php and display in columns
JonnoTheDev replied to stitchlips's topic in PHP Coding Help
Same principle http://www.codewalkers.com/c/a/Database-Articles/Multicolumn-Output-from-a-Database-with-PHP/ -
Use as many as you like
-
Just looked at the site being scraped. Do as corbin said.
-
parse xml with php and display in columns
JonnoTheDev replied to stitchlips's topic in PHP Coding Help
post your loop and how you want it displayed -
Also you would use CURL to do this job not fopen()! You should set a pause between requests i.e. 20 seconds
-
Having trouble reading this post!! No wonder you got banned. You are trying to send 20000 requests to itemdb-rs.runescape.com without any pause in between requests. If that was my domain I would shoot you! while($i < 20000) { ini_set('max_execution_time', -1); $file = @fopen("http://itemdb-rs.runescape.com/viewitem.ws?obj=" . $i, "rb");
-
Because it is a MYSQL function not PHP mysql_query("INSERT INTO rate_referrals (ref_by,ref_mem,ref_set,ref_status,ref_date) VALUES ('".$row['m_id']."','".$id."','".$points."',0,CURDATE()");
-
[SOLVED] Passing Through a Word Document with PHP
JonnoTheDev replied to shmoyko's topic in PHP Coding Help
yep -
LOL
-
[SOLVED] Passing Through a Word Document with PHP
JonnoTheDev replied to shmoyko's topic in PHP Coding Help
Using headers <?php // use these headers to download a file after the user has clicked a download link $file = "/path/to/file.doc"; $filename = "file.doc"; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=".$filename.";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($file)); readfile($file); exit(); ?>