Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. Zend_Http_Client is basically CURL. The package has the same function. Why would you need the entire zend framework to make an HTTP request. This is so simple and is no way dirty. You are making a bit of a mountain out of a molehill. Process 1. User submits the form 2. Send the input via a HTTP POST/GET request to API url 3. Parse the XML response via SimpleXML 4. Act on response and display results to user Why do you need to even use AJAX for this? Most simple API's are called via GET/POST requests in whatever fashion, they simply return a response. If an API uses a WSDL then you would use SOAP to make the requests.
  2. echo "<table border=0><tr><th bgcolor=#E1E4F2>RSS Feeds ".getTotalLinks($rss_table)."</th></tr>";
  3. You would select the members data from the database in order to display a personal greeting. You need a good database design to store the test input. Use the member id as the foreign key against the test result so you can join the member to the test data. To keep the data persistent through the pages of the test use sessions. You should already be using a session to check that the member is correctly logged in.
  4. You can send the post/get data to the API via CURL. Then you require a parser to parse the XML response. This is quite simple. Read up on CURL and SimpleXML
  5. Font used doesn't look good. The brand images are of a poor quality. The black menu bars on the left nav don't look like they are actual links. Your modular headings should be more obvious to split the areas up - brands, news. The overall design doesn't look like a hardware store theme but I can see you have a lot left to do. Use proper CSS for layout and validate your HTML through W3C
  6. 100% stretch works better than 760 centered for forums in my opinion as there is obviously less wordwrapping.
  7. Yep. If I were you I would convert that video to flash and dont use autoplay. Let the user play the video if they wish. It is more than likely the video that is slowing it right down.
  8. Not keen on the header banner. Its far too big and pushes the posts away from eye level. Every time you click you have to scroll down to read the posts.
  9. http://www.imagemagick.org/script/index.php
  10. http://www.fckeditor.net/
  11. Takes ages to load up
  12. Can you post the query
  13. Get a CSS book or go through some tutorials. http://www.davesite.com/webstation/css/
  14. Try persistent connections $db1 = mysql_pconnect($host,$user,$pass); $db2 = mysql_pconnect($host,$user,$pass); mysql_select_db("db1",$db1); mysql_select_db("db2",$db2);
  15. Are the databases on the same server. You dont have to open 2 connections if so, you can prepend the table name with the database name: mysql_query("SELECT * FROM db1.tablename ",$conn); mysql_query("SELECT * FROM db2.tablename ",$conn); Just dont use mysql_select_db()
  16. http://csscreator.com/?q=tools/layout Whats with the mass of non breaking spaces in your HTML?
  17. Always, always, always check that the variables you test in conditions contain the expected values by simply printing them to the screen prior to posting your code for review! If the data is contained within the reserved variables $_POST or $_GET use: print_r($_POST); exit();
  18. <td align="center" valign="top"> On another note you should be using CSS for layout. This HTML is old and outdated.
  19. Ooohhh. If we show you how to do this you won't really learn will you. A pointer for you: URL Parameters index.php?layout=1 index.php?layout=2 index.php?layout=3 $_GET
  20. session_register() is obsolete and should not be used at all. Once your user has logged in correctly set a session to true. i.e. // user has logged in correctly $_SESSION['authorised'] = true; On the page you want to check that a user is logged in: if(!$_SESSION['authorised']) { // redirect to login header("Location:login.php"); exit(); } On your logout page destroy the session value: unset($_SESSION['authorised']);
  21. You should also place this in a function as you are using the same test 3 times if (preg_match("/http:\/\//i", $message)){ header("Location: error.php"); exit(); }
  22. Then do some debugging. Check these variables contain the expected data $from = $_POST['email']; $sender = $_POST['name']; $message = $_POST['body']; Remove the else statement at the end of the script also as lonewolf has stated
  23. because you are using elseif and else conditions. you dont need to. compare the 2 scripts again. if you are using exit() then the script terminates so there is no requirement for else or elseif
  24. Run as a background process, not through a web browser if slow. Should not really be slow, are you sure it isn't the remote site or your internet connection?
  25. Use CURL as you can set a proxy address i.e. curl_setopt($ch, CURLOPT_PROXY, "ip:portnumber"); // if authenticaton is required curl_setopt($ch, CURLOPT_PROXYUSERPWD, "username:password"); http://uk.php.net/curl As far as free proxies just search Google, you will find loads. However they are not always reliable and get abused. Better paying for private addresses.
×
×
  • 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.