jazz
-
Posts
24 -
Joined
-
Last visited
Never
Posts posted by jazz
-
-
-
Easiest way ever.
Throw the data in an SQL database and create a SELECT statement based on the user 's choices. Let the DB do the hard work for you.
-
It is useless. Completely useless.
-
Thank you for your reply. I added it but to no avail. The Expect header did indeed disapear, but nothing more changed.
Here are the new headers:
POST /test.php HTTP/1.1 Host: 85.17.135.223 Accept: */* Content-Length: 10495 Content-Type: multipart/form-data; boundary=----------------------------4047ac8569bd
-
Hi,
I am dead in the water with this. I cannot discover the problem.
I am trying to upload a file with curl and also pass a text value. It refuses to work.
Here 's a test form:
<?php if (!empty($_REQUEST)) { var_dump ($_REQUEST); } ?> <html> <body> <form> <input type="text" name="a" value="value1" /> <input type="file" name="file1" /> <input type="submit" /> </form> </body>
And then there 's the php script.
$url = 'http://85.17.135.223/test.php'; $file = getcwd().'/'.'step3.php'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array('type' => 'direct', 'file1'=>"@$file", 'a'=>'aaaaa1')); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLINFO_HEADER_OUT, true); $result = curl_exec ($ch); echo curl_error($ch); $info = curl_getinfo($ch); var_dump($info);
Here are the headers:
POST /test.php HTTP/1.1 Host: 85.17.135.223 Accept: */* Content-Length: 10448 Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------------------b64cdfea8248
It does not work like it does if you do in through the browser. No script output! How can I make this work?
Thank you!
-
It is rather trivial. You need to make your canvas BIGGER first, THEN rotate the image and finally CROP it to the correct size to remove the white/black extra space that was added.
That 's all.
Also, your site has a rather huge security bug...
-
Put you credentials in a config.php file and include it as necessary?
-
-
I 'd use AJAX to send get the initial time info for the server and do a count down form there. If the server 's time is such that does not allow the premium content to be viewed, the AJAX call would return an error.
-
document.getElementById('my_response').innerHTML += "Found data: " + data + "\n";
document.getElementById('my_response').innerHTML += "No data found\n";
Replace += with = .
-
It is like asking if it creates problems in the speed of your car if you wear heavy clothes as you drive.
Well, yes you might see a decrease of abut 0.00001 miles/sec but then, do you really care?
-
Kalhmera,
What you need to understand is that you did not tell the browser that your binary data is an image.
Blob stores binary data. We need to let the browser know it is an image.
Now, the problem is there is no html tag to do that. You have to use the standard img tag like the image was not on a database but it was a file.
Make a script that outputs only the image for a given id (e.g. image.php?id=whatever). Do note that you will need to use the header() command to specify that you are outputting an image.
Then in your main script, in the part of the table you want to display the image, instead of sending the binary data, use img src="image.php?id=..."
That 's the outline, for the actual implementation, well, it's up to you.
-
There is no limit to the session variables you can use. Well, if you use a million of them, you 'll find that your hard disk is not that empty anymore. ;D
-
If you think PHP is moderate, then I suggest you go to Python or Lisp.
-
I'm still slightly confused.
If the user logs in, and the home.php page has require_once, is that a connection? Then, if they click on another page that has require_once, is that another connection? How does that work?
Also, what would my hosting provider mean by 50 simultaneous MySQL connections per user?
You don't need to worry. 50 SIMULTANEOUS MySQL connections is GOOD. You 'll need to have a lot of people visiting your site to need an upgrade in hosting.
A require_once tells you nothing about how many connections the script does to the MySQL server.
-
-
All the functions that use the wrappers to access files are effectively restricted under safe mode. So, it would be normal for require to be restricted by it.
-
If I require_once a MySQL connection script on each page of my website, does that mean a new connection is being made each time? What is the best way to minimize the amount of connections being made to the database?
No. It means that whenever the code of that script is called (e.g. it contains functions) and it connects to MySQL, it connects to MySQL.
Roughly: Calls = Total calls to the script * mysql connections that the scripts uses
-
So my understanding is that, in answer to my question, YES post data sent from an http page to an https processing page IS encrypted; HOWEVER, that is only true if the SSL request itself was not hi-jacked before the data is sent.
Technically, even if it gets hijacked through man in the middle method, it will still be encrypted. The problem is it will be encrypted by the attacker.
-
Thank you both. :)
-
Hi,
There is no reply button in the "PHP Freelancing" thread? I just registered, but I can't find any requirements. Do I need to have a number of posts?
Thanks!!
I need help desperately !!!!!!
in Third Party Scripts
Posted
Do you have all that information in a database? Did you write code to query the database and get results?