-
Posts
15,266 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
The URL is only the path portion. You probably don't need to concern yourself with the domain, so really all you need is to match the index.php and add a condition for the query string. <rule> <match url="^index\.php$" /> <conditions logicalGrouping="MatchAll"> <add input="{QUERY_STRING}" matchType="Pattern" pattern="^aggrement$" /> </conditions> <action type="Rewrite" url="index.php/aggrement" appendQueryString="false" /> </rule>I think. That does a rewrite - the user doesn't get redirected. If you want a redirection then use a "Redirect"-type action. Reference
-
I know. I was anticipating a "what is domdocument" reply.
-
What does your web.config look like?
-
1. Look at the syntax highlighting near the beginning of the code. See how the echos are black but the exit is green? Something changed in between them... 2. Those echos aren't using correct syntax for strings. Read this to learn what kind of syntaxes are allowed.
-
if( $_GET['stepaa'] || $_GET['stepab']|| $_GET['stepac'] ) { echo "$_GET['stepaa']"; echo "$_GET['stepab']"; echo $_GET['stepac']"; exit(); } ?> Drop Down Draw Draw outline for Enhance Make Drop Down an Oval Ovals a circle circles arms hands feet foot lower face belt ears ear eyes eye brows nose lips retinas shoes boot wings wing beak tail body hairs waist leg hip fingers horn horns weapon book table crown ribbin locket bangles head mouth tongue necessary improvements to finish , . & Drop Down an Oval Ovals a circle circles arms hands feet foot lower face belt ears ear eyes eye brows nose lips retinas shoes boot wings wing beak tail body hairs waist leg hip fingers horn horns weapon book table crown ribbin locket bangles head mouth tongue necessary improvements to finish. Next time, please post short code like yours directly into the post. Many people don't like having to download attachments.
-
Load the HTML into DOMDocument, use getElementsByTagName to get all the H2s and loop over them, and for each one set the "id" attribute to whichever value you want according to its textContent. DOMDocument
-
pv can only act like cat, and you can't use that to copy a directory structure either. How about doing a cp -v to see each file being copied? Or maybe... uh, tar c to stdout, piped to pv, piped to tar x from stdin? But doing this might even slow down the copy. As for rsync, -v and/or --progress should work. No pv.
-
Redirect loop when SEO mode is off and redirecting to correct path
requinix replied to Danielx64's topic in PHP Coding Help
The REQUEST_URI includes the query string too. $page_url_rewrite will be either "test" or "?p=test". Dump out $_SERVER and look for a more appropriate value to use... -
View ALL of a specific users posts
requinix replied to benanamen's topic in PHPFreaks.com Website Feedback
I take it you're not talking about the Find Content button in a user's profile? -
What does phpinfo() say about whether the soap extension is loaded?
-
That response is all messed up. JSON and a PHP dump? Wrong Content-Type? Or maybe it's just what you posted here? json_decode the response body.
-
Creating an alert system for rapidly changing data?
requinix replied to Grayda's topic in Application Design
None of that makes any sense. Are you in the right thread? -
What's onEventDeleted? Something is firing off that event and that is where you need to put the confirmation dialog.
-
If you don't manage the server then there's nothing you can do. As for how to use cURL, here is a basic example.
-
The page is being refreshed because of that location.reload(), so if you don't want that to happen then don't put that code in there. Is the .alert-success (which you should probably put an ID on rather than relying on just the class name) visible? As in it doesn't have a display:none or something? If it is, and probably should be, then you need to .show() it too.
- 2 replies
-
- javascript
- form
-
(and 2 more)
Tagged with:
-
Is mail() returning true or false? Have you checked your spam/junk folders? Try using a library like PHPMailer to send emails instead. It is much more sophisticated than simply calling mail() and with it your emails have a higher likelihood of not being detected as spam anyways.
-
If you need to process that file on your server then you'll need to get a copy of it to your server somehow. Even if that copy is just in memory, there's no way around retrieving the contents. As for disk space, if you download a copy to a file then there's no reason why you can't delete the file when you're done with it. Try using cURL to see if it behaves differently.
-
You want to give them a URL to your site but have it download files from some other site? Would it be enough to support the URL on your site but do a redirect, which most people won't know or care about? You can if you put them in [code] tags. I've already done it for you.
-
Creating an alert system for rapidly changing data?
requinix replied to Grayda's topic in Application Design
There are two root problems here that you can't really solve: 1. The Kp index is not completely accurate, in the sense that you cannot state "a rising value indicates a possible aurora" nor "a falling value indicates an aurora is ending" - the alternative meanings probably being due to random fluctuations and/or margins of error*. 2. Given two "high" Kp values, you don't know for sure whether they correspond to two different (chances of) auroras. For example, a change from 5->7 could indicate an increasing chance of the same aurora (such as 3->5->7) or the chance of a second aurora (as in 7->5->7). Consider that the rising or falling Kp value is not an event itself but rather the symptom of an event. That is, after all, what it actually represents. What you want to do is notify users of the aurora event (or more precisely, a particular likelihood of an aurora in the near future), and do to so you use the Kp index to decide when one might start and when one might have ended. As such the question is not whether you should send a notification at a certain Kp value but whether the new measurement does/does not belong to a particular aurora event that has/has not had a notification sent. Follow that? Honestly, I would pick a method, go for it, and see how it performs. Maybe you offer different options to the user so they can decide how they want their notifications? My first attempt would be with your last option: define the beginning of aurora event as being a series of consecutive Kp values above some threshold for some period of time and the ending as consecutive Kp values below some threshold for some period of time. Here are two examples of that approach: a) Auroras begin with Kp >= 5 for 10 minutes; auroras end with Kp b) Auroras begin with Kp >= 6 for 20 minutes; auroras end with Kp Also note that the second example has a buffer of uncertainty, where the Kp value can fall 6->5 for a while without being considered the end of an aurora. * Speaking of margins of error, you may want to round the figures you receive. Like to the nearest tenth? Fifth? Because the hundredth between 6.99 and 7.00 shouldn't be treated as a significant difference. -
LanceL, are you looking to hire/pay somebody to solve this for you? Or were you looking more for help with PHP so you can do it yourself?
-
What are you doing to advance the time? If you did that part properly then the date would advance when it should automatically.
-
Manipulating (cutting) Array Data and Output Size
requinix replied to vbcoach's topic in PHP Coding Help
Please don't make me lock this thread, guys. Yes, we could have easily answered the question. I (or anyone) could have posted the answer, you would have copied it, seen it working, and been on your way. But would you have learned anything? Not really. Well, maybe: it's possible you're one of those types who will take code given to them and try to understand what it does, but in my experience the majority (not everyone) of people who ask programming questions on the internet are not like that. So I gave you a couple bits of code that will (should) get you most of the way to the answer. rwhite35 talked about putting variables in strings. Jacques1 suggested you use a templating engine so you don't have to deal with embedding PHP code into HTML. But not even all of that combined would not have given you the complete solution. And that's the point. The normal process is that someone posts some code to help, OP comes back saying it doesn't work, we ask how it doesn't work and what their code is, they post, we tell them what they're missing, they figure it out, and we're done. Sometimes repeating those last couple steps a few times. Hopefully OP learned what was going on so that next time they come across a similar problem they will be able to say "oh, I recognize this situation from a problem I had earlier - I wonder if the same sort of solution will work for it too". We avoid giving out answers not because we want to annoy but because we want people to learn, and being fed answers doesn't really do it. Unfortunately not everyone understands that, and those people will spend months or years coming back asking simple questions because they aren't learning - or worse they quit after a couple threads because we didn't tell them the answer and they get frustrated and ragequit. You seem to get that we're trying to help you learn. Yes, sometimes threads get sidetracked and sometimes the discussion gets heated and sometimes people get offended. It happens because we're human. How about we take a step back, reconsider what this thread is supposed to be about, and go back to where we left off in that normal process? You have some code that isn't working. If you only put the code I posted into what you had then you're still missing something to make it work. So: what is the code you have now and how is it not working? -
Load the XML into SimpleXML $xml = new SimpleXMLElement("http://steamcommunity.com/profiles/76561198283429063/?xml=1", 0, true);then use SimpleXML's "simple" means of accessing information. Keep in mind that most of what you get from it will be objects and not strings so you'll probably want to (string)-typecast stuff. If you have a problem with something in particular then post your code and an explanation of what's going wrong.