Jump to content

mme

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mme's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks its all working! I tried $row['date'] before but I did not know it was possible to do it like you said ($row->date). It formats the date as well as checks it against a generated hash. But thank you for your suggestion.
  2. Hi, I have the following code $rs = mysql_query('SELECT * FROM transactions WHERE acid='.$acc); $result = array(); while($row = mysql_fetch_object($rs)) { array_push($result, $row); } echo json_encode($result); Now I wish to change the value of a certain column in each row that is returned from the database. The column is called 'date' and contains a unix timestamo that I wish to format using my function stime($var,1). How would I do this? Kind Regards, mme
  3. Hi, I have this issue with wp-e-commerce (http://wordpress.org/extend/plugins/wp-e-commerce/) 3.8.8.3 that the pagination is broken. The url generated is as follows http://MYWEBSITE.com/products-page/page/2 it should be http://MYWEBSITE.com/products-page/2 Is there a way that I can use .htaccess to remove this from the url? Using Wordpress 3.4.1 Thanks, mme
  4. mme

    Comparing Dates

    Hi, I am trying to make a simple reservation program with PHP and MySQL. How do I check if that Room is available between certain dates. My Table looks like this: Thanks, mme
  5. Thanks I did not know such a simple function existed. This was exactly what I was looking for. -mme
  6. Hi, I am trying to split a string into an array and then seeing what sort of data it is. eg; I get the following string I need to be able to put this into an array so in this case myarray[type]=somethingelse myarray[api]=somerandomkeyhere myarray[user]=someuser myarray[password]=somehashvaluehere but it could include many more/less different value's separated by the & symbol. Thanks, -mme
  7. Hi, I am trying to make it so I can pass a new line of text from php to the ajax script while it is being executed. Then displaying this text on a new line each time (kind of a scroll log in Wordpress when it is updating plugins) example: <div id='mydiv'>text already here<p /> addtext('some text'); would add 'some text' to the existing text in a div <div id='mydiv'>text already here<p />some text Can anybody give me a simple tutorial or an explanation. Thanks, -mme
  8. Hi, I am trying to see if the domain name in the string is in an array. eg; mystring='http://google.com/somethingelse'; myarray[]='google.com'; myarray[]='anotherdomain.com'; in this case return TRUE mystring='http://phpfreaks.com/adir'; myarray[]='google.com'; myarray[]='anotherdomain.com'; in this case return FALSE How would I do this? Thanks, -mme
  9. Hi, I want the user only to be able to download the files directly if they are using a certain user-agent, I know it can be spoofed but it will stop some of them. is there a way to do this using .htaccess? Thanks, -mme
  10. No, I tried with both however no changes are showing so it looks like I am going to look for a different host. Thanks for all your replies and help.
  11. Thanks, I have figured out what the problem is. Is there any way to increase this? EDIT: already tried this but it does not seem to have any effect: Top of the page. ini_set('post_max_size','10M'); And also in my .htaccess php_value post_max_size 20M Thanks, -mme
  12. Thanks for your quick reply's, Hmm I just tried it with a smaller file which seemed to work without any problems. However It seems to get errors with larger files (2MB). Is there a limit as to how big an array value can be to post? 1. It seems to work with smaller files 2. According to my host it has a max filesize of 10MB
  13. $myfile=$_FILES['uploaded_file']['tmp_name']; What is the remote server going to do with that? Just trying to figure out why that's a parameter, since it's a local file that the remote server can't do anything with. My guess is that there's something that's messing up the post data between the '@' symbol an the file name, like an invalid character; unfortunately I'm really not too familiar with CURL. Thanks for your quick reply, Basically what it is doing is sending the uploaded file to another server which processes the $_POST['my_file'] variable as a file upload and stores the file on the server. if (!empty($_FILES['my_file'])) { move_uploaded_file($_FILES['my_file']['tmp_name'],$filename); } Hope that helps, Thanks, -mme
  14. $myfile=$_FILES['uploaded_file']['tmp_name'];
  15. Hi, I am trying upload files to a remote server using CURL however It is not sending all the values in the array. $auth_local='testing123'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $auth_remote_url[$auth_no] ); curl_setopt($ch, CURLOPT_POST, TRUE); $post_array = array( "auth"=>$auth_local, "auth_e"=>$auth_e, "my_file"=>"@".$myfile, "md5"=>$md5, "check"=>"0", "upload"=>"Upload"); curl_setopt($ch, CURLOPT_USERAGENT, "Test Upload"); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $response = curl_exec($ch ); curl_close($ch ); When I check the value of $_POST['auth'] it is blank. When I remove "my_file"=>"@".$myfile, It does read the correct value Why is this not returning a value? Thanks, mme
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.