Everything posted by Highway7
-
Automated testing
Thanks for your reply. So how does TDD work for a website? Does that mean you build the site in stages and test each stage once it is completed?
-
Automated testing
Hi everyone, Does anybody know of any automated tools for testing websites once they are built? Free or paid suggestions both welcome. Thanks! DFB
-
Question about Amazon and my website - help required
Hello, I am creating a website for a book review website. They have asked me if I can set the site up so that when they add a book into the CMS, all they have to do is enter the ISBN number and the site will automatically pull in information (such as the image) from Amazon directly. I know this is possible as their current site does it. However, I am not sure of the legalities of this. Naturally, I don't want to receive any threatening letters from Amazon's lawyers at any point so need to know if it is okay to do this. Any ideas anybody? All help appreciated, thanks. -John
-
How to improve a site - help needed
Some good stuff there guys - much appreciated. Thanks
-
How to improve a site - help needed
Hi, I'm going for a new position and have been asked for suggestions on how to improve the following website. I have a few ideas but was wondering if anybody else had any ideas: www.booking.com All suggestions welcome and appreciated. Thanks Mike
-
Route planner integration
Hello, I am looking to create a website which integrates a route planner into its pages where users can type in two destinations and a mode of transport and be given a rout. It will work exactly like this: http://www.connectteesvalley.com/jplanner1.asp Does anybody know how I would go about this. Are there any plugins which do this sort of thinhg? I don't mind paying for a plugin if it does the job. Thanks in advance for your help. John
-
Image Uploader
Hi, I have a site which requires the user to upload multiple images at once. Using jQuery I have set it up so that the user can select individuals individually (using the file browser) and then upload them all at the same time bty clicking 'Upload'. However, this is not really good enough... What I need to happen is that when the user browses their machine to select their images, they are able to select multiple images through CTRL+click. At the minute they can only select one image at a time. How can this be achieved? As I already have the upload process working perfectly, I would prefer that I was able to keep this intact and simply add some javascript which allowed multiple images to be selected by the file browser at the same time. I would also prefer, if possible, not to use flash. Does anybody have any ideas? All suggestions are appreciated. Thanks.
-
Need help creating zip file with PHP
Thanks for your reply Nathan, Do you have some sample code of how I would go about implementing that class? Thanks
-
Need help creating zip file with PHP
Hi, I have created an event site which has an image uploader which creates a directory for the images for each event. Admin users then need to be able to log in to the back end and download these events as zip files. So, basically, I need to know how to create a zip file from a directory. The images are already in there, I just need to know how to create www.domain.com/event-images.zip from www.domain.com/event-images. Any help is greatly appreciated Thanks
-
serialize() problem
Ive tried both of those already with no luck. Any ideas anyone please? Could it be something to do with the fact that I need to create a class?
-
serialize() problem
sorry which code do you mean?
-
serialize() problem
I get the following error: WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 1] 1 Any ideas how to resolve this? Thanks for your help.
-
serialize() problem
The field type is longtext so it should take it ok. Ive tried both mysql_real_escape_string and base64 encoding without any success. I get the same error. Thanks - any ideas welcome.
-
serialize() problem
Hi, I am trying to insert an array into a mySQL database using the serialize function. When I echo the function onto the page it works and I get this: a:1:{i:0;s:3:"111";} However, when I insert this exact same variable into my dabase, it becomes null and I get this: a:1:{i:0;N;} I am using wordpress and this is my code: $serialized_xer = serialize($album_array); echo $serialized_xer; $wpdb->query("UPDATE $wpdb->nggalbum SET sortorder = '$serialized_xer' WHERE id = '$album_id' "); All help is greatly appreciated. Thanks
-
cURL error connecting to https
Hi, I am attepmting to send info to a secure https site using cURL. When I try to do so though, I receive the following error: 7 couldn't connect to host I am including the following SSL info: // SSL info curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($handle, CURLOPT_CAINFO, "https://www.tt2.co.uk/gateway/includes/intermediate.crt"); so shouldnt really be getting an error. Does anybody know why this is? All help is appreciated. Thanks.
-
cURL problem
OK I tried linking to the Apple site and that seems to work. There is just an issue when I link to the site I posted above. Do you know why this site could be different?
-
cURL problem
Yes I can connect to the site using a browser just fine. Do you have any other ideas? Im pretty stumped as Im new to cURL. Ive been looking round on the net for a solution but nobody seems tro have one. Thanks
-
cURL problem
Tried it again and I'm now getting this error: 7 couldn't connect to host Thanks.
-
cURL problem
Thanks for the tip. Im getting the foillowing error: 6 name lookup timed out Not sure what this means though? Thanks again.
-
cURL problem
Hi, Thanks for the reply. I don't think there is actually an error, but it doesn't work. In my previous code, you will see a section which says: $result = curl_exec($handle); print "<textarea rows='10' cols='80'>"; print htmlentities($result)."hello"; print "</textarea>"; //exit(); var_dump($result); This section is for testing, to make sure the XML bering sent is valid. When I try and output it into the textarea, nothing shows up. And the var_dump($result); returns bool(false). Any ideas why nothing is being returned? Thanks
-
cURL problem
Hi, I am using cURL to send XML from site A to site B. Site B the processes this data and returns XML info to site A. Site A then parses and displays this XML. I am using the following code and having problems: <?php // Define vars $endpoint = 'https://secure2.epdq.co.uk:11500/'; //Define payload define('XML_PAYLOAD', '<EngineDocList><DocVersion>1.0</DocVersion><EngineDoc><ContentType>OrderFormDoc</ContentType><User><Name>URAdmin</Name><Password>TT2Access</Password><ClientId DataType="S32">49868</ClientId></User><Instructions><Pipeline>Payment</Pipeline></Instructions><OrderFormDoc><Mode>P</Mode><Id>01</Id><Consumer><Email>john@urbanriver.com</Email><BillTo><Location><Address><FirstName>John</FirstName><LastName>Barker</LastName><Street1>113 Borough Road</Street1><Street2></Street2><Street3></Street3><City>Jarrow</City><StateProv>Tyne and Wear</StateProv><PostalCode>NE32</PostalCode><Country>826</Country></Address></Location></BillTo><ShipTo><Location><Address><FirstName>Jane</FirstName><LastName>Smith</LastName><Street1>22 High Street</Street1><Street2></Street2><Street3></Street3><City>Northampton</City><StateProv>Northants</StateProv><PostalCode>NN1 1NN</PostalCode><Country>826</Country></Address></Location></ShipTo><PaymentMech><CreditCard><Type DataType="S32">1</Type><Number>4921819895586270</Number><Expires DataType="ExpirationDate" Locale="826">07/12</Expires><IssueNum></IssueNum><StartDate DataType="StartDate">04/09</StartDate><Cvv2Indicator>1</Cvv2Indicator><Cvv2Val>703</Cvv2Val></CreditCard></PaymentMech></Consumer><Transaction><Type>Auth</Type><CurrentTotals><Totals><Total DataType="Money" Currency="826">1</Total></Totals></CurrentTotals><CardholderPresentCode DataType="S32">7</CardholderPresentCode><PayerSecurityLevel DataType="S32"></PayerSecurityLevel><PayerAuthenticationCode></PayerAuthenticationCode><PayerTxnId></PayerTxnId></Transaction></OrderFormDoc></EngineDoc></EngineDocList>'); // Init $handle = curl_init(); $xml = '<EngineDocList><DocVersion>1.0</DocVersion><EngineDoc><ContentType>OrderFormDoc</ContentType><User><Name>URAdmin</Name><Password>TT2Access</Password><ClientId DataType="S32">49868</ClientId></User><Instructions><Pipeline>Payment</Pipeline></Instructions><OrderFormDoc><Mode>P</Mode><Id>01</Id><Consumer><Email>john@urbanriver.com</Email><BillTo><Location><Address><FirstName>John</FirstName><LastName>Barker</LastName><Street1>113 Borough Road</Street1><Street2></Street2><Street3></Street3><City>Jarrow</City><StateProv>Tyne and Wear</StateProv><PostalCode>NE32</PostalCode><Country>826</Country></Address></Location></BillTo><ShipTo><Location><Address><FirstName>Jane</FirstName><LastName>Smith</LastName><Street1>22 High Street</Street1><Street2></Street2><Street3></Street3><City>Northampton</City><StateProv>Northants</StateProv><PostalCode>NN1 1NN</PostalCode><Country>826</Country></Address></Location></ShipTo><PaymentMech><CreditCard><Type DataType="S32">1</Type><Number>4921819895586270</Number><Expires DataType="ExpirationDate" Locale="826">07/12</Expires><IssueNum></IssueNum><StartDate DataType="StartDate">04/09</StartDate><Cvv2Indicator>1</Cvv2Indicator><Cvv2Val>703</Cvv2Val></CreditCard></PaymentMech></Consumer><Transaction><Type>Auth</Type><CurrentTotals><Totals><Total DataType="Money" Currency="826">1</Total></Totals></CurrentTotals><CardholderPresentCode DataType="S32">7</CardholderPresentCode><PayerSecurityLevel DataType="S32"></PayerSecurityLevel><PayerAuthenticationCode></PayerAuthenticationCode><PayerTxnId></PayerTxnId></Transaction></OrderFormDoc></EngineDoc></EngineDocList>'); // // Options // curl_setopt($handle, CURLOPT_URL, $endpoint); // 12 seconds timeout curl_setopt($handle, CURLOPT_TIMEOUT, 12); // Allow redirects curl_setopt($handle, CURLOPT_FOLLOWLOCATION, 1); // Return result (expecting XML?) curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1); // The actual "payload" curl_setopt($handle, CURLOPT_POST, 1); curl_setopt($handle, CURLOPT_POSTFIELDS, $xml); // SSL info //curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, TRUE); //curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 2); //curl_setopt($handle, CURLOPT_CAINFO, "/certs/certificate.crt"); // Run/return results $result = curl_exec($handle); print "<textarea rows='10' cols='80'>"; print htmlentities($result)."hello"; print "</textarea>"; //exit(); var_dump($result); // You'd probabaly wana check errors too. // Close. curl_close($handle); // // Now we'll want to parse the XML that the endpoint returns (the payment processor site) $xml_return = simplexml_load_string($result); if ($xml_return->result == 'OK') { echo 'system processed payment'; } else { echo $xml_return->result; } ?> I have tried using an $xml variable as well as XML_PAYLOAD as the parameter in the CURLOPT_POSTFIELDS without any success. From looking at the above code, does anybody have any idea where Im going wrong? Thanks
-
Need help with the background of my site
The way I would do this would be to have the header bg-image on the body. I would then create a div called wrapper which would cover everything. On this, I would put the footer bg-image and give it a position of bottom. I would then put the container div inside wrapper. The container would be 860px wide and contain your header, content and footer divs.
-
Posting XML with PHP
Hi, I am attempting to integrate my clients shopping cart with an epdq system. What I need to do is submit the customers details (name, address, card number, order etc) as XML to the epdqw URL (held on another server). This then processes the data and returns a success/error message as XML, and I need to process this data to display a confirm or error message. As I am posting to another server, I can not use javascript so need to do this in PHP. What I am unsure of is how to post the XML to the external server behind the scenes (that is, without the browser directing there). Any and all ideas are welcome. Thanks
-
Adding latest wordpress blog entrys on an external php page
If you are using a pafge outside the wordpress install to interact with the database, then it is just like a normal PHP/MySQL query. Query the database as you would normally and parse the data. You can find hundreds of tutorials using google on this.
-
Turn PSD Into CSS Background
Hi, The poster above is right. Having the whole image set as your background-image is not the way to go. Massive download time. Create three divs - header, main content and footer. Have header and footer at a set height and create an image for both. For the middle, create an image which can repeat on the y-axis, allowing for a much lower download time. This also allows the content to be dynamic.