Jump to content

msinternet

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by msinternet

  1. I would say that it is probably: http://www.wavemaker.com/product/ Martin
  2. Hi all, Looks like I beat you all to it! The problem was that the ASP.NET form uses a __VIEWSTATE in the form which is like a rubbishly implemented session identifier. So you have to initiate a session, get the viewstate and then add that to the post data. I did this by doing a cURL request, trimming down to the value and then performing a second cURL data submission. Works like a treat! I hope someone finds this helpful anyway, Martin
  3. Hi, if it was me I would use numerical indices and maybe a lookup array. Then you can loop through with a for loop to build a second inverted array. Or, in a similar way use a foreach loop to go down a layer and build the second array. Martin
  4. Hi, why not just use comand line stuff like scp etc. If it is a one time thing why not just download and reupload to the other server. Martin
  5. Hi, 1) you could use an include like include('file.php') then it will be like the scripts are combined. 2) use a session variable or get string then use header to load the other page after other stuff has happened. 3) use cURL. this will load a page in the background kindof like Ajax in JavaScript. 4) put the processing inthe other page in to a function and just call the function. Hope that helps. Martin
  6. I wondered if there might be something to do with the form I am trying to mimic being ASP.NET. I know this forum is probably more php guys but someone might be able to give me a clue. Thanks all
  7. Hi brainy ones, I am having a real problem with a cURL script. I based it on something that worked in another site but this is failing. The idea is a registration form is filled in on one page and the data is sent via cURL to register you in another system. If I run the script I get an output of the form as if I had not sent any post data but I am sure I have done this correctly. I set the content type etc. but it just will not work. If I complete the form that is returned it works fine. The site I am posting to tries to set a cookie but I think I am handling this correctly and I have echoed my NVP string and that looks fine. My code is: $post = "ddlLearnerGroups=" . urlencode($_POST['group']) . "&auth=" . urlencode($_POST['auth']) . "&txtLogin=" . urlencode($_POST['username']) . "&txtPassword=" . urlencode($_POST['password']) . "&txtCPassword=" . urlencode($_POST['password2']) . "&txtFName=" . urlencode($_POST['fname']) . "&txtLName=" . urlencode($_POST['sname']) . "&txtEmail=" . urlencode($_POST['email']) . "&txtPhone=" . urlencode($_POST['phone']) . "&txtQuestion=" . urlencode($_POST['secretquestion']) . "&txtAnswer=" . urlencode($_POST['secretanswer']) . "&btnSubmit.x=46&btnSubmit.y=13"; $url = "http://www.example.com/directory/Registration.aspx"; $header = array("POST /directory/Registration.aspx HTTP/1.1", "Host: www.example.com", "Connection: close", "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)", "Accept-Encoding: gzip", "Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7", "Cache-Control: no", "Accept-Language: de,en;q=0.7,en-us;q=0.3", "Referer: http://www.example.co.uk/", "Content-type: application/x-www-form-urlencoded", "Content-length: 0" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)'); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_VERBOSE,1); curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$post); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_REFERER, 'http://www.example.com/directory/'); //curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $curlres = curl_exec($ch); The return headers are: HTTP/1.1 200 OK Connection: close Date: Wed, 19 Aug 2009 17:10:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 18329 I really need to get this working ASAP but I am stumped. Thanks in advance. Martin
  8. Hi, I like the first version. It's a bit flat but a nice layout and while I don't really like splach screens it has good impact. Martin
  9. Hi, 1) If you want a fixed width site make it central. 2) The graphics are grainy. 3) It is all very wishy washy. Try to work out where you want people to look and put focus on that. 4) never use times new roman Martin
  10. I'm lazy too. generally nice. Nothing wrong with a dark site. Never use times new roman. Use headers, preferably in <H1> tags. Add some frames around content and some nice shiny graphics wouldn't go a miss. You could use some interactivity even if it is a mouseover image for the tabs. There is a lack of contrast in the contant section. You should be able to easily separate foreground and background and there is too much that is not quite in or out of focus if that makes sense. I do really like the wavy top bit though. Martin
  11. Hi, Sorry. Website design requires several different skills. Coding is important, first you have to learn a way but try to learn the best ways (DIV's vs tables). Graphic design and visual communication are also vital. There is basically none in this site. Look at how modern sites use graphical backgrounds etc. read about graphic design etc etc. I always recommend drawing a site on a piece of paper before even touching the computer. Then, mock it up in fireworks / photoshop / illustrator etc. This way you can play with colours, gradients, fonts, shadows etc easily. Then, finally when you already know what you are trying to make get coding. With our web juniors I always get them to copy a few templates from template monster for the sake of getting a feel for how to use the tools and learning to breakdown what looks good and what does not. To give you credit you are trying but you need to do some serious work here. Sure read up on HTML / CSS but the design thing is most important to you. Martin
  12. Hi, I really like it. I particularly like the flex chart stats thing. Very slick. The only thing I don't like is the colours in the front page. I just think a slightly different shade of dark orange would work better. Martin
  13. Hi, Well I like the avatar. That's about it though. This does not look like a professional site. You need to consider some basic design rules: focus, contrast, colour etc. Don't use capitalised text except in a few label type places, even box headers are too much; people won't read them. Graphically the site needs work, the round edges are pixelated and the green/yellow/grey thing just doesn't work. Seriously lose the faded in the middle gradient. HTML wise do not use <font> it is depreciated. Try looking through similar sites or templatemonster or web design awards sites to get ideas for colours and layouts. Read lots on HTML and graphic design. Sorry to be kind of negative but if I told you it was good I would not be doing you any favours. Martin
  14. Hi, Sorry. Well, it's better than the old one at least. The background is ok. The red is too strong a colour as is the black. The black panels draw the eye too much and flat colour plus corners = out of date looking. Also the gradient header background just look out of date. Try printing the design and drawing on it in pencil stuff like adding round corners and a few shadows and gradients (not too much though). Look at kuler.adobe.com to test colour schemes and look through www.templatemonster.com for design ideas. Try not to copy too much but buttons, borders, shiny bits etc are fine to get inspiration from. Hope that helped Martin
  15. Hi, I quite like it. The torn paper thing is good. Maybe the top banner section could be a little more graphical and in other places to. Generally good though. Martin
  16. And there was me thinking the occasional unintentional system format was part of a developers day...
  17. Hi, I think you want the query to be SELECT * FROM `search_table` WHERE `column1`,`column2` LIKE "%$trimmed%" ORDER BY etc. Note the comma Martin
  18. The functions you want are fopen() and fwrite() check out w3schools they have a good reference on this. Martin
  19. You need teh foreach loop. foreach($_SESSION['submitted'] as $key => $value) { $data[]['key'] = $key; $data[]['value'] = $value; } echo $data[0]['key'] . "\n"; echo $data[1]['key'] . "\n"; echo $data[2]['value'] . "\n"; echo $data[3]['value'] . "\n"; echo $data[4]['value'] . "\n"; we are putting the array keys and values in an array and selectively fishing them out. Martin
  20. First step has to be putting them in an array and sorting them. Next I guess you would loop through and apply rules but we need more info on these. Martin
  21. Hi, You would need to give each name a class like names an id with an incrementing value like name1, name2 etc. Then you would want a function in the head that is something like: set total =0, search dom tree to put all elements with class=names in an array then do for (var i in namesarray) { total = namesarray.value + total } getElementById('total').value=total Martin
  22. I assume you arte using a SQL database. If so you need teh LIMIT command if(isset($_GET['pageid']) { $start = ($_GET['pageid'] -1)*10; } else { $start = 0; } $query = "SELECT * FROM `links` LIMIT '" . $start . "',10" etc. any of teh bits in this you don't get try w3schools.com they have a good php section. Martin
  23. Hi, 1) strlen(str_replace(' ','',$string));
  24. Hi, <? $sql = "SELECT DISTINCT materialFolder"; $sql .= " FROM tblMaterials"; $sql .= " ORDER BY materialFolder"; require("../connection.php"); $rs = mysql_db_query($DBname,$sql,$link); if ($rs) { while ($row=mysql_fetch_array($rs)){ print ("<tr>\n"); print ("<td width='39px'><img src='../css/images/folder32.png' border='0'></td>\n"); print ("<td><h2><a href=material.php?action=viewMaterial&name='" . $row["materialFolder"] . "'>" . $row["materialFolder"] . "</a></h2></td>\n"); print ("</tr>"); // ADDITION HERE BY MS $extraquery = 'SELECT * FROM `tblMaterials` WHERE `materialFolder`= "' . $row['materialFolder'] . '"; $extraresult = mysql_query($extraquery); while($extrarow = mysql_fetch_assoc($extraresult)) { print ("<tr class='fileRow'>\n"); print ("<td width='39px'><img src='../css/images/file.png' border='0'></td>\n"); print ("<td><h2><a href=material.php?action=viewFile&name='" . $row["materialFile"] . "'>" . $row["materialFile"] . "</a></h2></td>\n"); print ("</tr>"); } // ADDITION ENDS HERE } //end While ?> </table> <? } } function viewMaterial() { $sql = "SELECT * FROM tblMaterials WHERE (materialFolder = " . $_GET['name'] . ")"; require("../connection.php"); $rs = mysql_db_query($DBname,$sql,$link); if ($rs) { while ($row=mysql_fetch_array($rs)){ echo $row['materialID']; } } } Martin
  25. Your message is a bit brief but I think that what you want is to rewrite URL's to give variables. I.e. www.example.com/val1/val2 would be translated to www.example.com/index.php?var1=val1&var2=val2 To do this you need to use the .htaccess modrewrite functions. They are a bit tricky but there are loads of tutorials or someone on here may help you if you can give specifics. Martin
×
×
  • 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.