Okay, I have a list of URLs in a MySQL table. I want the script to automatically check each link in the table for 404, and afterward I want it to store whether the URL was 404'd or not, as well as store a time for last checked.
Is this even possible to do automatically, even if no one runs the script? ie, no one visits the page for a fe...
Hi,
I’ve throughout the last couple of years downloaded a lot of templates for websites and these are now starting to become chaotic in the different folders so I’m starting to get a overview of the different templates.
Regarding to this I was thinking about the way that WordPress displays the different themes installed in the themes f...
I have a MySQL database with some URLs in it. One URL per row. Each URL has my script on it. What I am wanting to do, is check if the file is still there via a PHP script. Not check if it 404'd, but rather check if it has been modified or replaced. Is this possible? If so, how would it be accomplished?
I was thinking making the remote f...
I have a method that returns a PDF file using DOMPDF. It sends all the right headers. It is generated on the fly (not stored on the server anywhere).
I now have to attach this PDF to outgoing emails. I did this in Kohana 3
$routeUrl = Route::get('secure_view_pdf')->uri(array('id' => $id));
$response = Request::factory(...
One of my interview Questions, if multiple users across the world are accessing the application, in which it uses a Table which has a Primary Key as Auto Increment Field.
The Question how can you prevent the other user getting the Same Primary key when the other user is executing?
My answer was I will obtain the Lock on the table and I...
How can I write a program in php to get the domain information of an existing domain or if a domain name is already taken...? I would like to get the information using php.
...
I have installed WAMP. I am using Tomcat 6 to run my PHP scripts. I am also using JavaBridge.war and I have copied my php scripts into \webapp\JavaBridge\project.
I have removed the semicolon from php.ini file before the statements
extension=php_mysqli.dll
extension=php_mysql.dll
I have added C:\wamp\bin into my PATH env variable. I...
Um, this might sound a bit weird. We were having some problems with a specific browser under a very specific condition, and finally narrowed down the problem to the fact that we were not properly destroying the old sessions after doing session_regenerate_id(). I believe I have solved this problem by doing session_regenerate_id(true) now,...
I am trying to write to a file. I do a file_exists check on it before I do fopen and it returns true (the file does exist).
However, the file fails this code and gives me the error every time:
$handle = fopen($filename, 'w');
if($handle)
{
flock($handle, LOCK_EX);
fwrite($handle, $contents);
}
else
{
echo 'ERROR: Unable to ...
Hello.
I have a VBulletin 4.x forum running on my server. Some forum tables were converted into InnoDB for performance reasons according to this instruction. Forum itself does not use transactions (no START TRANSACTION or BEGIN WORK in source code) at all and InnoDB tables are used just to prevent tables from locking on UPDATE queries. ...
How do you ensure early enough in the PHP request pipeline the verb is POST and deny others?
...
Hello Guys,
I have some problem in drupal registration page.
I want to change whole user registration page. in registration module i want to add new field type. Bcz i want that user can choose the date from date-time picker. I have ready date-time picker which i have implement, but i don't know where to put that code.
I want to...
mysql_connect("localhost","root","");
mysql_select_db("hitnrunf_db");
$result=mysql_query("select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '""' TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n' ");
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=your_desired_name.xls")...
Possible Duplicate:
Create subdomain upon user registration
Suppose i have a site and i wish to give a sub-domain for each registered users.
like my site http://site.com/
and the test-user is a user registered on my site and site want to make sub-domain for that user.
Like http://test-user.site.com
Like http://test-user1.s...
Maybe I'm asking a stupid question, but I can't understand this behavior:
<?php
$this->meeting->google_id = 'test';
$test = $this->meeting->google_id;
var_dump(empty($test));
var_dump(empty($this->meeting));
var_dump(empty($this->meeting->google_id));
?>
gives output:
bool(false) bool(false) bool(true)
Why the ...
I have quite a few objects in my system that implement the PHP SPL Iterator interface.
As I write them I also write tests.
I know that writing tests is generally NOT a cut 'n paste job.
But, when it comes to testing classes that implement Standard PHP Library interfaces, surely it makes sense to have a few script snippets that can b...
I'm in the process of adding 'pretty' URLs to an existing CMS, the menu is auto generated and the new 'pretty' URLs are to be handled independently as a seperate module. The auto-generated menu allways has URLs that look like this index.php?menu_id=n which ofcourse we would like to see as eg. /news or /products
I'm currently at the poin...
I'm baffled. What could be causing 'catch' not to be working and how do I fix it?
<?php
try {
throw new Exception('BOOM');
error_log("should not happen");
} catch(Exception $e) {
error_log("should happen: " . $e->getMessage());
}
?>
Actual output
[27-Apr-2010 09:43:24] PHP Fatal error: Uncaught exception 'Exception' wi...
I am calling a soap function that returns the following array:
Array ( [FastAddressResult] => Array ( [IsError] => false [ErrorNumber] => 0 [ErrorMessage] => [Results] => Array ( [Address] => Array ( [Id] => 13872147.00 [OrganisationName] => [DepartmentName] => [Line1] => Methley Grove [Line2] => [Line3] => [Line4] => [Line5] => [PostT...
Hello!
I am trying to build a news reader that is using the Bing News API. When I am using a keyword that does not use special characters the result displays fine on the page but if I use for example Ö I get errors, BUT if I save the results (because the API delivers fine results even when using Ö) in a local file and use that to print ...