You can either get the html form by using fopen or using cURL.
fopen may not work with external pages it all depends on how php has been setup. And of course cURL may not be installed (you can check this by looking at the output from phpinfo()).
Once you have the content of the html form in a variable you will need to use a regular expression to find all instances on the page that are form inputs.
User Profile
Collapse
-
the code was provided in an earlier post:-
ini_set('memory _limit', '12M');
change the 12M to the value you want. However you may not have permission to increase this.Leave a comment:
-
what pbmods says is 100% correct another thing that should be done is proper validation of user input. If for example you ask someone their age then ensure they provide you with an int.Leave a comment:
-
Not quite \w is for the following range:-
a-zA-Z0-9_
so misses out the - but of course you could add that in. I personally however prefer whenever possible to use ranges so that it is easier to see what a regular expression does. Unless you specifically know what \w does you will have problems decoding the regexp whereas you have a better chance with actually using the ranges....Leave a comment:
-
PHP has a configuration option that limits the memory a script can use. The error message that you show indicates that the operation requires more memory than you are allowed....Leave a comment:
-
As suggested by ManWithNoName they will be using preg_match or some other regular expression based function.
However they won't be checking for all characters that cannot be used they will be checking if the string only contains characters that can be used. A username for example may only allow letters and numbers so they could use the following regular expression:-
'/[a-zA-Z0-9]+/'
If it fails then they...Leave a comment:
-
try putting the following at the top of your script:-
[PHP]error_reporting (E_ALL);[/PHP]
It is possible that you are running out of memory when trying to resize.Leave a comment:
-
If the output is valid HTML then you will get the desired output. As long of course as you have not used something like html_entities.Leave a comment:
-
use a limit clause in your sql
use mysql_query to execute the query
use mysql_fetch_ass oc to load it into an array
iterate through the array doing whatever you wish to do with it.
Now have you made a start ?Leave a comment:
-
DELETE FROM table_name WHERE date < (SELECT CURDATE()-6) AND user_id = 3
I have not checked the SQL but this was just to give you the gist. This code would delete all records from table_name that were older than 6 days old and belonged too user with the id 3.Leave a comment:
-
just 1 thing you have 0-1 in the regexp. You definitely only going to have 0 or 1 in the name?Leave a comment:
-
-
Try echoing out $word and print_r() $repository
1 possible reason for the error is that the database is not returning any rows so $repository is not getting set.Leave a comment:
-
when you navigate to the page look in the source and see if the image loadtion is as it should be.Leave a comment:
-
You say the only problem is with the image. Are you actually going to tell us what that problem is or should we guess?
An error message would be nice, if not an actual description of the error is needed.Leave a comment:
-
presumably drgulrez[02,00][2].doc is actually a file? Also it might be best using a server path to the file in fopen as well.Leave a comment:
-
A normal mod rewrite rule is what you are looking for. As long as you do not specify the R flag in the rule the user will be unaware of anything happening.
For example something like this will work:-
Code:RewriteEngine on RewriteRule ^viewer/([-_a-zA-Z0-9]+.jpg)$ /viewer/?id=$1 [L]
Leave a comment:
-
As stated = is an assignment but == is a comparison. Be very careful not to get the 2 mixed up. For example if you have:-
while(a=b)
{
execute code here
}
you will end with with an endless loop as a=b will always evaluate to being true (unless for some reason the assignment failed.
With regards to the \n and endl question. I believe \n is platform specific but endl (of course depending...Leave a comment:
-
touchring some SMS gateways allow 2 way SMS messages. Clickatell for example have this facility (of course it costs)Leave a comment:
-
if you only require 1 record from the database why not just select 1 record from the database?
Use sort by RAND() LIMIT 1 at the end of your query and it will return 1 record randomly as a result.Leave a comment:
No activity results to display
Show More
Leave a comment: