I have db with column named "link"
Links have redirect urls, which I want to change.
I have php script, which would take the link and gives me out put as follows
$redo = get_redirect('htp://www.mydomain.com/long/url/here&ID=123');
print_r($rez);
this is the output:
Array
(
[0] => htp://www.otherdomain.com
)
how do I loop all i...
I'm trying to debug some code in my first serious CodeIgniter app and I can't seem to find where I can simply get the raw SQL that my ActiveRecord code just generated.
$where = 'DAY(`datetime_start`) = '. date('d',$day) .' AND ';
$where .= 'MONTH(`datetime_start`) = '. date('m',$day) .'';
$this->db->from('events')->where($where);
...
I have a programme listing database with all the information needed for one programme packed into one table (I should have split programmes and episodes into their own) Now since there are multiple episodes for any given show I wish to display the main page with just the title names in ascending and chosen letter. Now I know how to do th...
i'm using a php page and it gets refreshed(on submit) . i need to keep the value of a textfield from a previous submission. how to make it
...
Is it possible in PHP to get a count of the number of bytes transmitted to the client? For example, if I'm outputting a 10 MB file, is there a way to find out if all 10 MB were sent to the client, or to see if the client interrupted the transfer partway? I know Apache will log this afterwards, but I'd like to access the data in PHP.
...
could any one please tell me what are the attributes that are send with $ship_data ?
I am too confused about it.
I know that ORIGIN ADDRESS, DESTINATION ADDRESS, NAME etc.. need to be send.
But how the data should be aligned. Like name is FIRST, address is SECOND etc...
Any help will be useful
**>
// create new fedex object $f...
I have a line of code that get a count of rows in my table and then display the count. In this case it display the number of downloads.
Right now the count is very small but when it gets larger ( great than 1000) I would like to format it to display with commas in the correct spots example:
1,000
100,000
1,000,000
Or perhaps with a ...
Hello
how to extract all text from HTML file
I want to extract all text, in the alt attributes, < p > tags, etc..
however I don't want to extract the text between style and script tags
Thanks
right now I have the following code
<?PHP
$string = trim(clean(strtolower(strip_tags($html_content))));
$arr = explode(" ", $str...
Edit: Revising My Question
When building an external PHP module in C, how do I link shared objects?
...
Hi,
I have just started a new job out of uni and I am learn OO PHP we have a custom framework where I work and my boss was talking about teaching me how to use JQuery with objects. I am also unsure whether he means objects from PHP classes or whether JQuery has its own object of some type. I am not sure exactly what he means by this. I...
Hello
I like to return the strings in this table
<tr class="rowodd" onclick="window.location.href='/portal/offers/show/entityId/32114';">
<td>01.10.2009</td>
<td>AN09551</td>
<td>[2009132] Ich bin Un. <a href="/portal/clients/show/entityId/762350"><myimsrc="/img/bullet_go.pngs" alt="" title="Kundenakte aufrufen"></a></td...
I have a website where I am including a php library file and a javascript library file. I have condensed the problem to the following files:
index.php
<?php
include('constants.php');
?>
<html>
<head>
<script type="text/javascript" src="lib.js"></script>
</head>
<body onload="javascript:show_const_1('<?php echo(CONST_TEXT);...
I'm using an INSERT .. SELECT to 'duplicate' rows from a table (with a different foreign key).
This works fine, however it's inserting multiple rows and I now need to do another INSERT to insert multiple rows that are linked to each individual row in the previous SELECT... does that even make sense? Haha.
Basically there's a one to man...
When a user clicks a "Download PDF" link, I would like for the download prompt to appear and for the user to be able to download the file.
Currently, the user is just transferred to the address of the PDF file.
For example:
<a..[what goes here??]..>Download PDF</a>
It seems that there's a combination of JavaScript & PHP needed to do...
I have some small images and each has a "print larger image" link.
For example:
<img src="thumb.jpg">
<a href="#">Print Larger Image</a>
When the user clicks the "print larger image" link, my goal is to trigger the printing of "big.jpg".
How can this be done?
EDIT: ANTHONY HAD THE RIGHT SOLUTION FOR ME. I MODIFIED HIS CODE A BIT TO...
I have a web form that uses complete online. When they press submit it will start a file download for them.
At the moment, I process the form submission and generate a suitable file for the user and fire it off with suitable headers. eg...
header('Content-type: "application/octet-stream"');
header('Content-Disposition: attachment; file...
I originally had a submit button like this
<form action="<?php $self ?>" method="post" >
<input name="search" type="hidden" >
<INPUT TYPE = "Submit" Name = "Submit1" VALUE = "search">
</form>
it made this statment true
if(isset($_POST['Search'])){}
For a time all was well
then i made my submit button a image
<form action="...
I'm using HTMLPurifier to check for XSS in an entire HTML document. The problem is that it appears to strip out anyything that isn’t inside <body> tags. But, I want to keep everything, just look out for serious XSS attacks.
Any ideas how to allow <HTML>, <HEAD>, <META> etc.?
...
How is the best way to do a 'running total' system like the tags search on stackoverflow? If I click on 'php' for example, its show the total amount of items on 'each' other tags, and its very fast. How can I do this in php with mysql?
...
This is my code:
$testtime = str_replace('.', '-', '2009.07.08 17:01');
$timestamp = strtotime($testtime);
echo $timestamp . "\n";
echo $testtime . "\n";
echo date('Y-m-d H:t', $timestamp);
And this is my output:
1247065260
2009-07-08 17:01
2009-07-08 17:31
What's wrong?
Thank you in advance.
...