|
You can also use xargs: find . -name obsolete | xargs rm -rf
Nevermind...
|
|
|
|
|
Greetings,
I would like to know if anyone has any code or even VB script, Perl etc that can simply be run from a command line to download whatever page is on a browser and write the raw HTML to a file, it can also be MHT for that matter.
I know about using - Navigate etc for a specific web page. This is different. The page I go to require authentication with word art and user name and password etc. Then once there you must click a few times to get where you are going for the data. Therefore running a script to direct me to a certain webpage will not work. The page has to be displayed first and then downloaded.
So, I just want to take whatever is currently on the browser, mainly due to catch refreshes of new data. Understand the page I am getting data from is generated as from a database so I can not simply run a script file to download that page. The program must be able to simple be activated and write to disk what ever is displayed on the browser at the time the program is run.
I have a seperate data extractor to run against the new file to find the data I need. This file can always have the same name as well and be overwritten.
Thanks,
Antone
|
|
|
|
|
Antone Eason wrote: Understand the page I am getting data from is generated as from a database so I can not simply run a script file to download that page.
Of course you can. If the user does it simply to get to that page then you can write a script to do the same thing.
But if you really want to grab the browser then you must use something that interacts with the browser and then some other piece of software, presumably to save it.
Autoit on windows would do that.
|
|
|
|
|
Thank you everyone for all your replies. I have no updates on the issue as I do not have time to pursue this project any longer.
See ya,
Antone
|
|
|
|
|
hi, am building a simple social network, but how can i make each user view only his personal profile, friends in his network, share photos with his netwok without creating for each user his private page. as this will be wastage of computer resources and make the machine slow.
could anybody have some examples on this or know a link to tutorials that can help in this..thank u for your response in advance..
|
|
|
|
|
Check out a piece of software called dolphin, it's the best open source php based social networking software I can think of off the top of my head.
|
|
|
|
|
Use a database such as MySQL.
Steps:
1- Create a input page where they can add info and change profile styles etc.
2- Create the profile page and use posted variables to update the content
i.e.: profile.php?id=1001
and retrieve the info from the database for that user and print it in the profile page.
(So you've made 2 dynamic web pages and 1 database table)
Do the same process for the other pages.
|
|
|
|
|
I have to code php for a public service announcement that :
It is simply a form that has a place to enter your name and announcement. When you click the submit button, the application takes the form data and appends it to a text file. Each time you view the form page, before it presents the form it displays the contents of the file you were saving the data to. I am a beginner and in a hurry.
|
|
|
|
|
|
I'll second fly 904 - good resources.
|
|
|
|
|
Hi everyone,
I'm relatively new to PHP and am experiencing a problem trying to loop through multiple arrays whilst comparing strings during each iteration of the loop.
What I have is two arrays; one with a list of illegal file names and one with a list of filenames pulled from a scandir function. Although it doesnt work this is what im trying to do:
$illegalArray = array(".php", ".html", ".sql");
$filesArray = array("general", "connect.php, "_sql", "test.sql");
foreach ($filesArray AS $f) // Loop through the file names array
{
foreach (illegalFiles AS $i) // Loop through the illegal file names array
{
if (strstr($f, $i) // Check to see if the the string held in $f contains any of the text held in $i
print "illegal file";
else
print "valid file";
}
}
Hopefully that kind of makes sense. Basically I want to loop through the files array, check to see if the file name contains the string held in the illegal array. If it does then do something, if it doesnt, do something else.
I can get it working to the point where it outputs a list of the files that it shouldnt include (the illegal files) but I cant get it to output a list of files that it should include (from the $filesArray these would be the "general" and "_sql" file names).
If anyone can shed any light on what I am doing wrong here I would be eternally grateful.
Thanks for reading (sorry about the length)
Bryant
|
|
|
|
|
What you had was fine, up until the point where you output the file each time it passed a validation check in the other array. eg. 'general' would output 'valid file' 3 times and 'connect.php' would output 'illegal file' once and then 'valid file' twice.
What you should wait for is for all the checks to be done before outputing a result. The following snippet should work fine.
$illegalArray = array(".php", ".html", ".sql");
$filesArray = array("general", "connect.php", "_sql", "test.sql");
foreach ($filesArray as $file)
{
$is_safe = true;
foreach ($illegalArray as $illegal)
{
if(strstr($file, $illegal))
$is_safe = false;
}
if ($is_safe)
{
echo 'Valid File ('.$file.')<br />';
}
else
{
echo 'Illegal File ('.$file.')<br />';
}
}
Outputs:
Valid File (general)
Illegal File (connect.php)
Valid File (_sql)
Illegal File (test.sql)
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Fly you're a legend. Thank you very very much for that, that has bugged me for almost 2 days (believe it or not).
The beers are on me
|
|
|
|
|
send me the code to insert the data in mysql through php form
|
|
|
|
|
|
from where can i get php projects for beginning level/??
plz send me waqarnaeem2@hotmail.com
|
|
|
|
|
Have you heard of Google[^]?
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
what is joomla?pearl?
how are these different from PHP??
what is iphone developer?
what is sharepoint developer
|
|
|
|
|
|
Hi,
In my project there is singleton pattern used in php 4.4.4 and also Smarty used to display pages. Now we want to convert php 4.4.4 to 5.2.0 or above.
There is error occurred in singleton pattern like below.
"Non-static method" PaDbConnection::getInstance() should not be called statically in config.inc.php on line 177.
In config.php line no 177 is like below.
$db =& PaDbConnection::getInstance();
So I need help that how to modify the singleton class related to php5.2.0. anyone help me.
modified on Friday, July 3, 2009 12:22 AM
|
|
|
|
|
Go to php.net and check the release notes for all version of php between 4.4.4 and 5.2.0. In there you will find all the commands that have changed - and thus you should be able to find and fix your error. You should also get an error message that tells you what line is causing the error. that may help you in finding deprecated and removed commands.
|
|
|
|
|
Hi,
I am very new to PHP .
can any ne tell me how to strat and what to download for PHP and where to write php code?
Help me!!
|
|
|
|
|
|
1) First get a php & apache server running on your development machine like xampp[^]
2) Choose an editor. You can use notepad (if your using windows) but it doesn't colour the code for you, so it's hard to read. Good free alternatives are notepad++[^] and aptana studio[^]. If you don't mind parting with a bit of cash, Dreamweaver[^] is the don.
Then go through some tutorials like:
http://www.w3schools.com/[^]
http://www.tizag.com/phpT/[^]
modified on Wednesday, July 1, 2009 6:20 AM
|
|
|
|
|
Refer below sites. It will very useful for understanding and learning about PHP.
http://www.tizag.com/phpT/
http://www.w3schools.com/php/default.asp
|
|
|
|