Jump to content

chiprivers

Members
  • Posts

    468
  • Joined

  • Last visited

    Never

Everything posted by chiprivers

  1. I am wondering if somebody might be able to advise on the best way out to script the layout of my page. I want to display some thumbnail images in a grid of 4 columns across and upto 4 rows down. I will be displaying from the results of a query and with upto 12 records returned for each page display. How would be the best way to loop through the results so that I can display them in the desired way. Note also that I am trying to use CSS for layout the best I can instead of using tables.
  2. Sorry to ask probably real basic question but how do I impliment the class into my script, do I copy all that into each page I want to use it on or can I save a copy somewhere to make it accessible all the time? Sorry but not worked with classes in this way!
  3. Has anybody got any experience in uploading images and converting the format? I am looking to create a site that will include the ability for users to upload photos. However I recognise that users will probably have images in a collection of different formats and sizes. To make displaying these images easier I want to be able to convert images once uploaded to a common size and format. Cany anybody advise on how I may achieve this?
  4. I would like to display a number of thumbnail images on a page to act as an index of images which when hovered over a larger view of the image would be displayed hovering of the page. I can probably out how to do this using CSS but am concerned over how much data the page is going to have to download to have several images rady to display in higher res format. This problem can be reduced by having only a smaller selection of images on each index page. Is there an alternative methods of approaching this to give the same effect that may be able to perhaps not demand so much data transfer all at once?
  5. I am creating a very simple site to be able to sell just one product. On the checkout screen I have a input box for the user to be able to enter any promotional code they may have been given. The user can recalculate their purchase total using the entered code but at present when the script checks the code it is comparing it case sensitively but I want it to be case insensitive. I am using: if ($entered_code == $required_code) {... How can I can alter this so that it is not checking the case of the letters entered?
  6. I not so good at javascript cos I dont use it very often so some help with this one would be much appreciated. In a form I have two fields, one date and one time. When the form is submitted, I want to check that the date is submitted in the format 'dd/mm/yyyy' and that time is submitted as 'hhmm' (four digit number between 0000 and 2359). If either of these fields does not contain a valid entry then the form should not submit.
  7. I would like to set up a very simple chat room for my daughter to use with her friends. I am reasonably competent in PHP and MySQL and was wondering if anybody could suggest a simple way to create a script. The obvious way using what I alredy know would be to have the page auto refresh at regular intervals but I can think of several disadvantages of having the chat updated in this way. Is there an alternative way to update new message without refreshing the whole page?
  8. you could just use: if ($x % 2 == 0) { TRUE }
  9. Hi I am looking at creating a site feature where users will be able to upload images in a selection of original formats but have the script reformat the image so that all images are the same size and format ready for displaying on the site. At the same time, either with the same script or an additional script, I will need to generate a thumbnail image in a similar way. Can anyone point me in the right direction for how I may do this?
  10. This may be the problem cos if I run this straight on the command prompt it only reads the line as far as c:\program and fails, I guess because of the space. HOw would I get around this?
  11. Really struggling with this, I have googled everything I can think of and just cant find anything to guide me in the right direction. Is there anybody that has used the exec() function that may be able to help me walk through this one?
  12. I think the problem may possibly be something to do with first calling the program to run the command. From what I undestand, when you use the exec() function it will run the command from the c:\> prompt, do I need to do something first so that I am have changed to C:\Program Files\SourceTec\fvec> before executing the command?
  13. No error messages! Windows XP
  14. Further to my previous post, I have made some headway with my video script. If I run the 'Video Encoder for Adoble Flash' through the command line, I have a prompt like this: C:\Program Files\SourceTec\fvec> And I can do a basic video encode with default settings like this: C:\Program Files\SourceTec\fvec> fvec C:\xampp\htdocs\video\inputFile\input01.wmw C:\xampp\htdocs\video\outputFile\output01.wmv.flv where "C:\xampp\htdocs\video\inputFile\input01.wmw" is the input video file and "C:\xampp\htdocs\video\outputFile\output01.wmv.flv" is the resulting output file. The above works but I can not get this same operation to work using the exec() command in PHP. I am using the following: <?php $systemDrive = "C:\Program Files\SourceTec\fvec\fvec.exe"; // location of programme to run $inputFile = "C:\xampp\htdocs\video\inputVideo\input01.wmv"; // location of input file $outputFile = "C:\xampp\htdocs\video\outputVideo\output01.wmv.flv"; // location of output file $command = $systemDrive." fvc ".$inputFile." ".$outputFile; $result = exec($command); ?> However this is not working, Can anybody help with this? I have googled and googled and I cannot find any help on the net with integrating these two interfaces!
  15. So is anybody familiar with the exec command? how would I modify the example statement given to make it dynamic? Does the %SystemDrive% bit need replacing with anything or does it just know?
  16. If it helps, the executing command that it gives on the demo site is: "%SystemDrive%\Program Files\SourceTec\fvec\fvec.exe" "c:\inetpub\wwwroot\flash-video-encoder-command-line\asp-demo\files\{9874E9CB-B9DB-4BBC-B61B-6EF56E686431}.wmv" "c:\inetpub\wwwroot\flash-video-encoder-command-line\asp-demo\files\{9874E9CB-B9DB-4BBC-B61B-6EF56E686431}.wmv.flv" -vw 320 -vh 240 -vz L -ac 2 -tn "c:\inetpub\wwwroot\flash-video-encoder-command-line\asp-demo\files\{9874E9CB-B9DB-4BBC-B61B-6EF56E686431}.wmv.jpg" -tw 160 -th 120 But where does this fit into my PHP?
  17. I am working on a small project that involves uploading, encoding and displaying video files in flash format. I have got 'Video Encoder for Adobe Flash' and the command line version which I want to use to automate the encoding process. I have found this demo site http://flashvideo.sothinkmedia.com/flash-video-encoder-command-line/asp-demo/upload.htm that shows how it works and on the resulting page it gives you the command to execute but I dont know where to integrate this into my php script? Can anybody help?
  18. On a page indexing search results, I want to display a list of titles, underneath which I will give the first part of a related string of text. The amount of the text displayed should fill the display area (namely the table cell that it is in), much like you get on many search engines. Like this: Title Here Truncated string of text here until end of cell area with three dots at end if shortened... This would be simple to calculate if the cell was of a fixed size but I want the size of the cell to vary depending on the size of the browser display area. Has anybody dealt with this issue before or can anybody suggest a way to do it.
  19. A drop down box is one option but for the styling of the page I would prefer the prementioned design. I think it gives it a slightly more professional image and slightly easier functionality for the user. I think javascript is probably going to be the way forward, any javascript experts?
  20. $query = "CREATE TABLE tablename (field type, field type, field type)"; $result = mysql_query($query);
  21. Can any one help me with a script that will increase or decrease the value in a form input box each time either a plus or minus charachter is clicked on? Much like what you would have in a shopping cart, a form input box with say a number 1 default in it, you will have a + and - charaters next to the box and if you click on the + the number in the box will increment 1 and if you click on - it will decrement 1. I want this all to work without reloading the page!
  22. This works fine but it appears to download the whole file before it will show the video. Is there a way to modify this current script or an alternative script that will stream the video and start displaying the video straight away?
  23. Not sure if this is a PHP thing but I am sure somebody on here will be able to help me! How do I go about streaming video on my site? If I have a video file (possibly .avi ??) what would I put in my script to have this display on my site?
  24. I have the following piece of code: <?php // create multi-dimensional array of runners holding selectionId, best back, best lay foreach ($marketPrices as $key => $data) { // extract data to array $temp = array( "selectionId" => $data->selectionId, "priceToBack" => $data->bestPricesToBack->Price[0]->price, "priceToLay" => $data->bestPricesToLay->Price[0]->price ); // add array to multidimensional array $selectionPrices[] = $temp; } // end for each $marketPrices ?> Where print_r($data, true) returns the following: When I am running the script, I get this fault: Fatal error: Cannot use object of type stdClass as array in C:\xampp\htdocs\BFAuto\selectionLayer.php on line 61 Line 61 is: "priceToLay" => $data->bestPricesToLay->Price[0]->price ANy idea what is causing the problem here? I have the same construct, which I think is right, in the previous line and does not throw up an error! I am reasonably new to using objects so I may be wrong!
  25. Hi, thanks for the response, I was just coming back to put a post saying I had worked it out! I did that thing you wanted and now I get this error: Warning: ReflectionObject::__construct() expects parameter 1 to be object, array given in C:\xampp\htdocs\BFAuto\selectionLayer.php on line 65 Fatal error: Internal error: Failed to retrieve the reflection object in C:\xampp\htdocs\BFAuto\selectionLayer.php on line 66 I am working on a script that exchanges data through the Betfair API service for horse racing bets. This is one of the objects returned for a call I have made, however I understand that it is a combination of objects and arrays!
×
×
  • 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.