Jump to content

schilly

Members
  • Posts

    870
  • Joined

  • Last visited

    Never

Everything posted by schilly

  1. post your code. with sprintf you need to escape any % signs because it thinks you are inserting a value there so for date_format you need %%b %%d, %%y for the format.
  2. I've run into this same issue and am trying to figure out the best way to do this. both my domains are on the same server so i can access the sessions on both domain. i just trying to figure out how to verify the user so there isn't any session hijacking.
  3. http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format
  4. I do all my ajax via jQuery so you may want to look into that. much easier. http://api.jquery.com/jQuery.ajax/
  5. is $filenamefd set? could also try turning all errors on error_reporting(E_ALL);
  6. Ah crap. cURL won't work as the server will load the external script on the other domain and not the user's browser so the cookie won't set. Might have to switch to AJAX.
  7. If you actually want to go to their search page why don't you, on form submit, AJAX to a script which gets the special key add it to the form then submit the form?
  8. ya that would work for payment as no one would want to pay for someone else. this system gives access to specific resources which need to be locked to the person's account. I'm going to try out the cookie option and see how it goes. thanks for the reply.
  9. Try this: $dimg = imagecreatetruecolor($newwidth, $newheight); imagecopyresized($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight); You can also see my script here: http://www.damnsemicolon.com/php/dynamically-create-thumbnails-in-php-with-gd
  10. you dont have any $reg value in your link <a href=\"works/deleteadvert.php\"
  11. you have no return so the link will always go through. function confirmation() { var answer = confirm("Are you sure you want to delete the advert?") if (answer){ alert("Your advert has been deleted!"); return true; } else{ return false; } } I usually just do this: <a href="link" onClick="return confirm('Are you sure you want to delete the advert?');">Link</a>
  12. bah already solved. ill start a new thread. http://www.phpfreaks.com/forums/index.php/topic,312798.0.html
  13. I'm looking for a secure way to share session data across two different domains (not subdomains) on the same server. I've looked at passing the session id through a GET var to the other domain. It works but it looks to open the possibility of session hijacking and I don't really like having the session id in the URL string. Any way to make this secure? The other option I'm looking at is using cURL to load a script on the other domain that sets a cookie with the session id. When the person loads the other domain, check for the cookie, get the session id, connect to session then delete the cookie. Can anyone see anything wrong with this? Thanks.
  14. I'm looking to do something similar to this. two different domains on the same server that need to share sessions. How do you stop someone from sending a link with the session id to one of their friends and hijacking their session and using their account? I'm also looking at doing this through cURL to try and hide the session id but not exactly sure how. Any help is greatly appreciated. Thanks.
  15. do a select and see if the ean is in the db. if is it update the record quantity, if not add to a debug string. at the end mail out the debug string.
  16. Glad everything is back to normal. I was going nuts yesterday not being able to access the forums. Needed help bad. One of those I'm losing my mind moments.
  17. Ok looks like I got it. mb_convert_encoding($data,'UTF-8','UTF-16LE') Thanks for putting me on the right path PFMaBiSmAd.
  18. Here's is the content type in the header: Content-Type: text/csv;charset=UTF-16LE
  19. Ok it's definitely straight from the data I'm getting via cURL. Is there an option for cURL I can set?
  20. This is CSV data cURL'd from Apple. I don't think it's my code: $fp = fopen($download_path,'r'); //remove first line with column info $data = fgetcsv($fp); $date = substr($file,0,10); //parse csv file while($data = fgetcsv($fp)){ #$data = str_replace(array('"','%','$'),'',$data); #error_reporting(E_ALL); #print_r($data); $app_name = $data[0]; echo $app_name = mysql_real_escape_string($app_name) . "\n\n"; } Could it be the data Apple sending me? Should I convert it before i save it to file?
  21. I'm inserting some data from a CSV file into a database. I'm using mysql_real_escape_string to escape a string and getting some really weird output. ex. input string = Adobe CS5 output = \0\0A\0d\0o\0b\0e\0 \0C\0S\05 I plugged the string into mb_detect_encoding and it told me it was in ASCII and I did a bunch of searching to find out that \0 is a null byte. The only thing I can't figure out is how to convert it to something that won't give me that garbage when I run it through mysql_real_escape_string. I tried mb_convert_encoding($str,"ISO-8859-1","ASCII") and it didn't do anything. Anyone know something I can try??
  22. print out the array of data they send you and see what's in it. I know for IPNs it's under txn_id.
×
×
  • 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.