
defeated
Members-
Posts
246 -
Joined
-
Last visited
Everything posted by defeated
-
Hi, I've run into a problem, or rather users of the ap I'm developing are likely to run into a problem. I'm using simplexml with curl to parse RSS feeds. Mostly that works just fine. The trouble I've run into is that if a user is using feedburner. If they enter the feedburner url (http://feeds2.feedburner.com/blah) when asked for the feed they want parsed it is not a problem. If however they give the original feed url (http://mysite/feed) then the parser cannot load the feed. The relevant code is: $settings['feed-url']='http://mysite/feed'; //Fetch the RSS feed $ch = curl_init( $settings['feed-url'] ); if(!($ch)) echo "Could not initialise feed"; curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); if(!$feed = simplexml_load_string ( curl_exec($ch) )) echo "Could not load feed ".$settings ['feed-url']; curl_close($ch); That will result in the message displayed being "Could not load feed http://mysite/feed". If I switched the feed to be http://feeds2.feedburner.com/blah then it would work perfectly. I could tell people to just use their feedburner address, but it would be better if they could put in either. My browser can handle it, so my ap should be able to handle it too. Any ideas? I can't find this problem mentioned anywhere.
-
Sorry, I don't know what else to suggest. There is nothing wrong with the code. It should work. I'm too tired to think straight now anyway, so I'm off to my bed. If I think of anything I'll drop back in.
-
It works for me! Try running unbanp.php through this syntax checker. http://www.meandeviation.com/tutorials/learnphp/php-syntax-check/
-
Need the code on unbanp.php too. Up to the bit we were looking at.
-
ok, lets see the form code and all the code on the receiving page up to and including the bit we have been looking at. I'm off out to walk the dog for 5 mins and then I'll look at it.
-
You could also try $fname=$_POST['fname']; if($fname=="") { echo $errormsg; }//end if else { echo "String_post contained: ".$fname; }//end else Then you can get rid of the else section if it works.
-
I can't see anything wrong with that code at all. Try doing this... $errormsg = 'You left a field blank! Go back and fill it in.'; echo "<h2>fname: ".$_POST['fname']."</h2>"; if(empty($_POST['fname'])) { echo $errormsg; } If the data you put into the fname field does not come up in a big F off h2 heading, then your problem is with your post. Ooops, forgot to say that you have to put something into the fname field to test it.
-
I suspect the problem is having if(!empty(..... insead of if(empty(..... ! denotes not so "if (!empty" reads "if not empty", but that would mean that the error shows if the field is filled in rather than blank.
-
You could start by fixing your code so that it validates, but before you even do that.... what's with all the illegible text? Have a look at the Google Webmaster guidelines. If you are targeting SA then host in SA. If you are not then get yourself a .com domain. I'm wondering if you were really looking for advice, or just a link. It looks like you are using out dated SEO practice that will get you in hot water these days. The UK site can't be spending that much. They still have a lot of room for improvement to their onpage SEO. Then again, if they are at number one, then they don't have to worry about it. It's good news for you though. They are not invulnerable.
-
Woah, go easy on the over confidence there (I know sarcasm is low). This is not the only line on the site that says "I have no confidence" in myself though. You may be new at this but nobody wants somebody without any experience. Get rid of "First Vector Art" straight away. Art is subjective, I don't need to know that you have not been doing vector art for 25 years! If I like it I'll want you work for me unless you put doubt in my mind by telling me that it is your first attempt. I happen to like your layout. I have a suggestion for this section... It's rough and needs work, but you get the idea. Sell yourself. Nobody else will.
-
Please Review: New Retatil Store Outdoor Recreation
defeated replied to NickG21's topic in Website Critique
Easy to navigate. Things to look at:- [*]Why so few products on the front page. It looks bad. [*]Is that shipping price worldwide? Give me some shipping information. Who do you use, how long will it take to get to me. [*]Help with your order page is broken in Firefox/3.5.6 GTB6 [*]Image resolution too low when you click on them. With an online shop impressions are everything. Low resolution "full size" images, missing information or broken pages all take a toll on trust. If the website is not perfect, can I be sure that they are looking after my credit card details? Are they trustworthy? Because there are so many online scams you just can't afford to have any credibility issues arising from the 'feel' of your site. It looks a bit boring, but that is ideal for showing off your products, so it's not a bad thing. Just get that front page filled! -
Here is the long way around... First. In submit.php you have an if statement. If it validates you let it send. Easier to show you.. $each_param=$_GET['each_param']; //get all your parameters from the submitted form /* Validation checks. If valid $validation='valid;'. If not valid $error .=','.$each_param; */ If($validation='valid') { /* Send code */ }//end if else { //Recreate the page the form is on target is still submit.php (this page) echo "<input type='whatever' name='each_param_name' value='$each_param' />"; $error_values=explode(',',$error); foreach ($error_values as $key =>$error_content) { if ($error_content == $each_param) { echo "<br />Error field - please correct" ; }//end foreach }//end else Hope that makes sense. From a user standpoint, what happens is that if they enter non-valid data, they get the input screen again with an error message below the input field. What actually happens is that if the user enters non-valid data, they get served what looks like the same page again with error messages below any field that requires correction. They are however not on the same page, but are actually on send.php within the else section of the code. This sort of validation is better done with ajax, where the input can be checked as the user inputs data - slick! But, if you have not got to ajax yet, then this works and keeps the information that users input.
-
+1 for the coffee shop being left aligned like the rest of the site.
-
+1 Mchl I don't like being negative, but I found it difficult to read. I'm colorblind, but I found the colors used a bit jarring. Are those the reasons it has slumped a bit? No. It's all about reaching your target audience. I'm not a gamer, but I would think that a section called "cheats" would be a draw to your site. Anybody that has a cheat just adds it to the section.
-
I really like the look of it. There are a few things that bugged me a little. The computer sticks out from behind the sticker just a little bit. (viewing on firefox 3.5.6 on a mac) There are a few validation errors. Some people think that's not important, but google says it is, so I do too. Maybe find another way of doing the scroll. Marquee's are jerky and annoying, plus you will never get them to validate these days. What about grabbing some scrolling javascript script? Or even grab the code for one of those flash tag clouds that move like a globe. Then you could even keep each entry as a link. It's not ideal from a SEO standpoint, but would be a better user experience than the marquee imho. I have quite a few toolbars on my browser. Less of a gap at the top would keep the whole page in my screen without me having to scroll down. That said, most users will not have as many tool bars. I think it looks sharp and the company should be very happy with it. Nice job!
-
Hi, I'm working on http://www.webshed.ie It's still in the early stages, so I'd welcome any suggestions you all have. Cheers, Ian.
-
Please review my fashion site - fashionfame.com
defeated replied to dealrocker's topic in Website Critique
I like it overall... the critique bit.. Make the forum page the same as the rest... you are nearly there! (also the password box is out of line with the username box) On the front page you have a "add to your list of search engines" link. I wouldn't have noticed this in an negative light if it were not for the fact that my browser is rarely full screen. It doesn't look good when it passes onto the site itself. Why not give it a solid background and have it cover anything it moves over when the window is resized. For an example of what I mean look at www.itjobsearch.ie. The site is crappy but the top left triangle is what I mean. -
I thought that the main site was a bit thin on a widescreen monitor. If you need it to be so narrow, could you make it resize dynamically (eg. width:70%? The more important factor was that I didn't see any navigation back to the main site from the forum. I got to the forum and then couldn't get back.... not that I tried very hard... but who would? On my monitor it is very difficult to discern between site and background. Could you consider making the background a few shades lighter? I like black and white, but don't make me strain to see anything.
-
Not sure I entirely follow. but... $1=0; You set the index to zero.
-
Cheers cags. That makes sense... not awake this morning! I just wish I'd noticed this early on, rather than after I'd written thousands of lines of code on lots of pages that interact with that table. I'll mark it as solved for now, because logically that's all it could be.
-
Not sure I'm following. Are you asking if you can do away with the mysql query and just use php? If so the answer is no. assuming your table is called movies and your href is in a field called href, and also assuming that you have already connected to your db... $query=mysql_query("SELECT href FROM movies") or die("I got this messed up code on the internet and it doesnt work: ".mysql_error()); while($fetch=mysql_fetch_array($query) { $mvlink=$fetch['href']; echo "<object width=\"550\" height=\"368\"><param name=\"movie\" value=\"".$mvlink."\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"".$mvlink."\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"640\" height=\"480\"></embed></object>\n" ; }//end while loop That will cycle through every row of your db and put in the object defined on each row.
-
I have an odd problem happening with one of my mysql tables. Every now and again a line of data becomes blank with the exception of the id (auto inc). This is awkward because it is a list of users. It would seem that it is always the last user that gets deleted. Deleted is the wrong word to use because the row is not deleted... just stripped of all it's data. The row remains. (oh, and so does the encrypted password in that row and two other fields). My question is what sort of query would do this? I am assuming it is not some flaw with mysql the weaker link between mysql and my coding being myself. I can't think of any code on the site that runs a query capable of making these changes. I can't reproduce it at will either. It just "happens" every now and again. So it's not something running in a regular cron job. I know it's hard to give an answer without the code.... but there is a LOT of code on the site and I don't know which bit is relevant yet. I'm just looking for suggestions of what potential causes of the problem may be. Cheers.
-
[SOLVED] Wordpress at root. PHP/mysql pages in sub directories
defeated replied to defeated's topic in Applications
I've opted for the sub directory route. It's working fine at myScienceJobs.com. There will be a science jobs page on it too which will have its own database. First I have to do something with that background at the top. -
Cheers Keith. That makes sense. Thank you once again! At this rate I'll have to credit you in the site code!
-
Sorry Artacus, I haven't explained it well. It is a job board. When inserting a job there is a form. The form has several multiple selects or single selects from a select menu. All the data then goes into the db. examples. <select name='job_type' value='1'>Medical and Healthcare jobs</select> etc. Then based on that selection the next select box changes its content to reflect jobs in that category. Then there will be a list of salaries, a list of minimum experience, a list of locations. It is not possible to select something that is not in the list. I had it so that the value in the select was the same as the text so I ended up with.. id jobref jobtitle job_type job_role min_exp location 1 0908 Welder Medical and Healthcare Jobs medical welder 2-3 years North London Because that is only some of the fields the database was getting too large. So I did this.... id jobref jobtitle job_type job_role min_exp location 1 0908 Welder 1 56 3 18 But then when I want to display a job I need to translate it back into the plain english. Thus I need to do multiple joins to tables that contain the id's and the plain english. Perhaps I am going about it arse-ways? The trouble is that while there are only 1000 or so jobs the original version was ok, but if I get thousands of jobs I am using up more space than I need to. I hope it is a bit clearer now. 'english' was just for my example. The real fields do not make sense easily.