-
Posts
28 -
Joined
-
Last visited
Never
Everything posted by hawkenterprises
-
A simple run down on how it works is as follows [*]Apache Receives Request for a Path (ie /Computer/Services) [*]Apache checks for any mod_rewrite rules affecting the path requested [*]Appropriate rewrite rules will feed the path into a query string of index file sitting at the top level of path [*]php parses index file which has path_info function to deal with what was sent [*]PHP display appropriate information
-
[SOLVED] removing quotes from text field input
hawkenterprises replied to kcp4911's topic in PHP Coding Help
Have you tried preg_replace? $stripped_quotes = preg_replace("\"",'',$_POST['head']); Then entitize if need be. -
Problems retrieving variables from an online payment service
hawkenterprises replied to El_Guapo's topic in PHP Coding Help
I'm sorry, I can't in good conscious tell you how to solve your problem, perhaps someone else will. -
var_dump, but I would believe you got what you wanted. Mysqli Object() is a null Mysql database object. You probably need to run some methods to get a connection handler
-
Problems retrieving variables from an online payment service
hawkenterprises replied to El_Guapo's topic in PHP Coding Help
Generally you don't connect to payment gateways using the method you are attempting. On dibs website there is this link http://www.dibs.dk/teknik/teknik/ This link has all the technical information you will need. You are going to be using a secured socket connection. Something like Curl or Fsockopen is going to be your answer. What you have now will not work, nor be safe for your client or yourself. -
Um I think you need to re-read the passthru documentation. It talks that passthru is like exec() and executes a command. What you want is a datastream, not an execution. Fopen and filestreams are the right way to go here.
-
I'm assuming you mean something like this <font color="#XXXXXX">Yay</font> to this [color="#XXXXXX"]Yay[/color] If you are referring to CSS which you should probably be using instead then it's a whole another ball of wax with classes and ids to work with. Perhaps you should talk about what the goal of your project is and we can provide you with a possible another solution.
-
What your looking for is a marriage of PATH_INFO and mod_rewrite. You can take your url and make it http://<domainname>.tld/Computer_Services/search or something even more appealing to you. Try searching for Apache Mod_Rewrite on google. Apache has wonderful documentation but sometimes it's a little heavy for beginners.
-
mjdamato, you must be one of the freaks here.... I don't know about you but I didn't come into this world knowing everything and doing everything perfect. Perhaps your birth was virginal as well?
-
I use this function to do it for me function mysql2timestamp($datetime){ $val = explode(" ",$datetime); $date = explode("-",$val[0]); $time = explode(":",$val[1]); return mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0]); }
-
Mod_rewrite won't be the only thing you will need. You will also need some type of mechanism (PATH_INFO) or something else to determine were the files really are versus what the links are. .htaccess is only going to rewrite the url, your code will have to manage the rest. Wordpress achieves this marriage very well take a look at how it runs.
-
In PHP your code will compare routing numbers on the server side after the post is completed. If this is what you are requesting then just read the entire file into memory and do a strpos() to get what you are looking for. Otherwise to me it sounds like you are looking either for an AJAX/RPC "realtime" comparison which would require just a pure javascript (client-side) check in addition to the the PHP server side. However the fact that you don't understand these two principals and you are working with a finical transaction of some sort would beg the question about how secure your code will ultimately be, and do you or your client feel comfortable with that?
-
Setting parameters in file_get_contents.
hawkenterprises replied to Xproterg^vi's topic in PHP Coding Help
What is the intended purpose of this? It seems that if we knew the ultimate goal we might be able to help you find a different less complicated route. Any reason this can't user CURL or fsockopen instead? -
it's because after using mysql_query you need to use something else to fetch the data from the result. $line = mysql_fetch_array($result) will achieve this as well as many other ways
-
There is a difference between these two statements $num = 5; and $num = '5'; Also it goes more as to how PHP stores the information that is really what I was trying to illustrate. The fact is $num is typeless you are declaring type in the above to statements.
-
my guestbook , please critisize !!!!!!
hawkenterprises replied to webtuto's topic in Beta Test Your Stuff!
http://mixwebs.com/guest/login.php The username or password are mistaken please check theme again should be "them" Also when making a form with a post please try and tell the user what happen to their data. When I entered my data, I had to scroll down to see what was going on, it should be informative and at the top. Other than that looks good -
It's probably just easier to use one of the 1,000 of gaming ladder scripts out there http://www.google.com/search?q=php+ladder+single+elimination
-
Just to further note Everything is in PHP is a string, kinda like in ASP everything is a DIM until you do something that is TYPE Specific, like math functions or type casting. $IamString = '42'; $IamString *= 24.5; // Now I'm an float (there are no doubles just the names for historical reasons in PHP) $IamString .= 'two for tuesday'; // Now I'm a string again So just remember PHP is type-less language unless explicitly defined.
-
There is still the question of what ID works with what but you can try this SELECT models.modelname,type.typename FROM models,type WHERE models.typeid=type.id I think the other post will work as well I just haven't used that format of a join.
-
OPENSSL can be tricky if it's your first time, you have to make sure that you have all the keygens and packages. Can you give a bit more information as to what type of errors you are getting? You can view syslog if your on linux.
-
Well that depends on the SOAPs Server Request API traditionally you read the manual http://us3.php.net/manual/en/ref.soap.php Then if you still have a problem from there, perhaps show us a little more detail in your request of what you are doing then we could help.
-
Well when using any type of network protocol in raw mode, CRLF is the way to go. Also another note RFCs are generally the best bet when it comes to network protocol. Most languages tend to screw up the protocol and have goofy ways to do it. CRLF \r\n. Part of the reason you do a CRLF instead of a LF is because of legacy support. \n or Line Feed is relatively new and not supported by old machines where CR is and vice versa for modern systems so when in doubt use both
-
I appreciate the information, I fixed the problems. Array: http://www.hawkenterprises.org/dev/phpsearchpro/admin/?search_text[] I attempted to figure out a way that is exploitable, to say the least I didn't find a way. I couldn't backtick in, semi-colon break out, or javascript my way to freedom. I do find it horribly interesting that the parser actually converts [] to an array like that via get_string. Thank you for your security audit
-
Hello All, Hawk Enterprises has just released it's latest version of PHP Search Pro PHP Search Pro is a open source (free) script written in PHP that works off of keywords entered into it to pull up search terms. It's similar in the way google creates there indexes. This is the second iteration of this project so I'm hoping you won't find too many problems just be able to tell me what new features I should ad or what I should do to improve it. PHP Search Pro
-
retrieving record from looped ('by php') field names
hawkenterprises replied to cyber_ghost's topic in PHP Coding Help
Maybe I haven't had my coffee yet but your code didn't make alot of sense. What is looped field names? Most people just use the standard $_GET, $_POST, $_REQUEST... I've never have ran into an occasion to do what you are saying.