Jump to content

tomdelonge

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Everything posted by tomdelonge

  1. I'm trying to learn how to consume a web service using soapclient() I found this WSDL: http://www.webservicex.net/stockquote.asmx?WSDL And I tried this code: $params = array('AAPL'); $client = new SoapClient('http://www.webservicex.net/stockquote.asmx?wsdl'); $result = $client->__soapCall('GetQuote', $params); print_r($result); But I get this: stdClass Object ( [GetQuoteResult] => exception ) I haven't made a single successful call to their api. Also, do you guys know if there's a way to use syntax like this: $client->getQuote(); Shouldn't php know from the WSDL what functions are possible? Thanks for your help.
  2. I'm trying to help my client choose. Like I said, they want it to be fully transparent. It looks like paypal pro is transparent, but you have to provide the option for them to use express checkout. I think that will still look professional enough. Anyone know about Amazon FPS?
  3. The only requirement is that the process is "transparent", meaning, the user stays on the website. I've looked into authorize.net, paypal, and amazon fps. Paypal offers their "pro" version for $30/month. Authorize.net would probably cost even more (not sure though) I can't tell how "tranparent" amazon fps really is. Any experiences? Just let me know of any alternatives you guys have used. Thanks
  4. Sorry, maybe I didn't explain it well enough. The distance, not how long it takes to get there. And I'm talking through php, not just by looking it up online each time. I'll have a bunch of zip codes in the database, but I want to be able to find the approximate driving distance between any two.
  5. I can calculate the distance just fine (I found a tutorial that explained it quite well), but I also need to be able to calculate the driving distance between two points. I don't know how accurate it would have to be, but I can't figure out how to do it. Any ideas on where to start? Thanks.
  6. Is the number in parenthesis (I've always used 255) the number of characters that are allowed to fit? If so, I have a md5 hash to store. Should I just set that column to 32? Thanks...
  7. So, i'm not great with arrays... I need this prototype: $data = array( '$row->id' => '$row->name' ); So, I would presume I need to loop over the result set and add each new line to the old array. How do I do that?
  8. I used to use zend framework, but I love codeigniter. I'm sticking with that.
  9. I don't understand the ins and outs of how php is parsed, so I have some basic questions: *Do comments slow your application down? I'm using a framework, should I delete all the comments from every file? *Does whitespace slow anything down? Thanks for your help.
  10. Do the names of the database, table, and field have very much impact on speed? If I have way long names will it be noticeably slower?
  11. I need a simple website where users register and login, upload photos and comment and vote on each others. The main thing is that it will have contests so whoever get's voted for the most in a week or something wins whatever. If it works with a cdn that would be great. I've seen several gallery apps, but none that let users login and vote for each others.
  12. This is the first time using this new version (1.8.2) I get this error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /mydirectoryhere/library/Zend/Application.php on line 35 No matter what I try. I've even uploaded their "quickstart" application and it gives me this error. I don't know if it matters that my "public" folder is named "html" or something like that. Any ideas? There can't be anything wrong with application.php since I didn't write it...
  13. Sorry, should have mentioned that it's for someone who is technically inept. They couldn't manage that. I'll just have them log in and change the text. Trying to keep it simple for them...
  14. Say that in the backend of my application I want to be able to change the tagline on the front page of the website. Should I just store stuff to the database or is there a faster way?
  15. Yeah, I used justhost.com. I'm disapointed with their speed for magento. I understand that it's a large application, but I want something a little quicker. I'm probably going to try out mediatemple's gs. I've seen a lot of bad reviews for it, but they look like two or three years ago. I'm hoping they've ironed out the kinks. Any body else?
  16. My website is planning to grow (aren't most) so eventually I'll probably move to a dedicated virtual server. For now I'll probably use grid from media temple. Is it way slow (other shared hosts are extremely slow for me). I'm using magento ecommerce engine. Will a shared host serve pages fast?
  17. How can you have all links go to the home page except for a few specific ones? I've only got 5 pages, and I'm not adding any more. For example example.com/asdflklj;ew/afelj; would just go to the home page but example.com/contactus/ would go to example.com/contactus.php (the url wouldn't read the .php, just have the slash stay there) Thanks.
  18. Alright, I have a table called "tracking" that lists topics users track. So it has columns track_id, track_user, and topic_id. Then I have a table "messages" that has columns message_id, message_text, message_author, and topic_id. How do I return All the messages in threads so that they can all display on the same page. I know how to select rows where the user is tracking (so say it says they are tracking topics 3, 18, and 7.) How do I get all messages that have those topics ordered in an array so that it might be something like $result[0][0] is the third topic and first message and $result[3][2] is the second message in the 18th topic.
  19. Alright, it's statistically random, but I want to order some rows in mysql, and then have every single one be possible, but the ones near the top be more likely to be chosen. Understand? I don't... That's why I'm asking, how should I do that?
  20. Yeah. Except I'll have different messages. So I couldn't select all rows. Or maybe I could select all where the thread_id was the same and then order by timestamp. I think I'll try that. Thanks.
  21. Alright. I want an initial message in a database. Then any replies to this message need to be stored in order. Kind of like a thread in a forum. I just need a good way to organize it. Any ideas?
  22. Alright. Pretty simple idea. Say a user pushes the submit button (on this little message form I have). After processing, it automatically redirects to the page again. (They need to be on that page right after). I want the page to be the exact same except have a div element that says "thanks for your message" or some other thing. At any rate, could I pass it through a session? Or what...
  23. Nevermind, I solved it about 30 seconds after I posted this. Sorry. I went to this file: "Zend/Controller/Action/Helper/ViewRenderer.php" I changed this line: protected $_viewScriptPathSpec = ':controller/:action.:suffix'; To this: protected $_viewScriptPathSpec = ':module/:controller/:action.:suffix'; Pretty simple...
  24. Alright, it'll work perfectly the way I did it so far. But I run into a problem when I try to use modules. (Which I need). The way it's set up, I have a directory "templates". If I want to run "localhost/default/" it looks for the template inside "templates/index/". Basically, it goes for the templates/(controller)/(action) I need it to look for templates/(module)/(controller)/(action) Anyone know how to do that?
  25. When i use this script to process my form, the file is uploaded to the same directory as this file. I want it to go to a directory below it, in a folder called "uploads". Where do I put that? I would guess the $destination_path variable needs it somewhere in there, but I'm doing something wrong. It doesn't work. <?php // Edit upload location here $destination_path = getcwd().DIRECTORY_SEPARATOR; $result = 0; $target_path = $destination_path . basename( $_FILES['myfile']['name']); if(@move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)) { $result = 1; } sleep(1); ?>
×
×
  • 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.