|
|
The better way is to use urlencode. Thats the best way to get rid of spaces.
|
|
|
|
|
When user visit www.site1.com i need to set cookie with time of visit.
Then when user visit www.site2.com or www.site3.com i need to read cookie from www.site1.com so i know visitor time.
Is there way to set one cookie for multiple websites or multiple cookies for diferent sites?
|
|
|
|
|
I found this[^] on stackoverflow.com via Google, maybe it will help you?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
You should find what you want by making use of a database session manager instead of the default one in php. You can google this and find a number of articles on how to implement this. Besides sharing the session data between different domains you can also use this for load balancing multiple servers.
|
|
|
|
|
And how would you identify a session without setting it in a cookie that multiple sites can access. (Which cannot be done btw.)
You can set cookies for multiple of domains, or even easier call an image (PHP file) of another website that sets the cookie for you. (EG: call example2.com/images/cookie.php?mydta=1 from example.com)
|
|
|
|
|
you forgot that a session ID can also be stored in a url, which can be passed between the user and server. all session data would have to be stored in a common session database and you may still need to make custom session functions.
|
|
|
|
|
nevermind i found the way to do this!
|
|
|
|
|
and it would be good for you to post it here, so others can benefit.
|
|
|
|
|
i will post here once i get my project full tested and finished!
|
|
|
|
|
|
Hello All,
I am developing outlook addins using python programming lang. and I am not able to fetch Message-ID of the selected Mail.
I have googled and read lot of post and reply but didn’t get any satisfying solution and I don’t; want to use any other Property except Message-ID.
My whole Outlook Addin is Based on logic of the MessageID cause I have mine own server and I want dump that mail to My server and using the I am creating contact and documents on my server, in addition to this I have same Plugin for the Thunderbird so I want to both plugins to work same way. So I want to fetch Message-ID so I can use both plugin without thinking of OS weather it is Windows or Linux.
Is their any way I can fetch hat Message-ID.?
If it possible in some other programming lang than also please do reply on this.
Waiting for Positive reply
RegardsThumbs Up
Thank You... Smile
|
|
|
|
|
I have an array with 5 items and I want to increase index of array everytime when browser get refresh. In case when array is last index then next index whould start from first item.
Regards.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
To do this you will need to store the index that you are currently visiting in the session of the user, unless you want to include it in every link which won't cover a refresh (F5 button).
Storing it in the session could be done simply by:
session_start();
if ( !isset($_SESSION['index']) ) {
$_SESSION['index'] = 0;
}
$_cur_index = $_SESSION['index'];
$_SESSION['index'] = ++$_cur_index;
Note that if a browser uses caching this might not work, as the browser may never issue a request to the server.
|
|
|
|
|
Beginner ask some questions ?
- Is there any tools to develop PHP App like visual studio ?
- And in ASP.Net I am make Master page to add the design to all web pages ...How can i do somethings like this and what is the best to do ?
|
|
|
|
|
Honeyboy_20 wrote: Is there any tools to develop PHP App like visual studio ?
See my posts a few threats below.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Where ? I can not reach to post.
|
|
|
|
|
|
i m new to the linux. and have a knowledge of c,c++ but want to learn linux programming.
please provide me starting lesson about c programming in linux environment?
|
|
|
|
|
http://www.advancedlinuxprogramming.com/alp-folder[^]
The PDF's are pretty good One even describes how to write a server in C
Good luck!
See if you can crack this: fb29a481781fe9b3fb8de57cda45fbef
The unofficial awesome history of Code Project's Bob!
"People demand freedom of speech to make up for the freedom of thought which they avoid."
|
|
|
|
|
Did you get anywhere?
See if you can crack this: fb29a481781fe9b3fb8de57cda45fbef
The unofficial awesome history of Code Project's Bob!
"People demand freedom of speech to make up for the freedom of thought which they avoid."
|
|
|
|
|
the best book for linux programming is "Beginning Linux Programming 4th Edition"
Neil Matthew, Richard Stones, Alan Cox
here it is :
"http://ebookee.org/go/?u=http://www.fileserve.com/file/KkqkRjD/Begining%20Linux%20Programming%204th%20edition.rar"
enjoy it.
|
|
|
|
|
I am having trouble attaching a wav file to email through PHP.
<code lang=php>
$to = "John.Doe@TryHarder.com";
$from = "John.Doe@TryHarder.com";
$subject = "Test Email";
$message = "This is your test email";
$fileatt = "[Removed]\E1002.wav";
$fileatttype = "application/wav";
$fileattname = "E1002.wav";
$headers = "From: $from";
$file = fopen( $fileatt, 'rb');
$data = fread( $file, filesize( $fileatt ) );
fclose( $file );
$semi_rand = md5( time() );
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers .= "nMIME-Version: 1.0n".
"Content-Type: multipart/mixed;n" .
" boundary= {$mime_boundary}";
$message = "This is a multi-part message in MIME format.nn" .
"–{$mime_boundary}n" .
"Content-Type: text/plain; charset= iso-8859-1 n".
"Content-Transfer-Encoding: 7bitnn" .
$message . "nn";
$data = chunk_split( base64_encode( $data ) );
$message .= "–{$mime_boundary}n" .
"Content-Type: {$fileatttype};n".
" name= {$fileattname} n" .
"Content-Disposition: attachment;n".
" filename={$fileattname} n".
"Content-Transfer-Encoding: base64nn" .
$data . "nn" .
"–{$mime_boundary}–n";
$mail_sent = mail($to,$subject,$message,$headers);
echo $mail_sent ? "Mail sent" : "Mail failed";
</code>
It seems what ever MIME is doing ends up being the body of the email and the attachment doesn't come though.
If someone could point out what i am doing wrong i would be forever grateful.
I am fairly new to PHP so please forgive me if this comes of as basic.
|
|
|
|
|
I have figured out the issue i was a little off but got it working with the following code.
$to = "Brad.Harris@prosodiecrm.com";
$from = "John Do<WhoCares@Cant.com>";
$subject = "Test Email With WAV";
$message = "This is your test email";
$fileatt = "Removed\E1002.wav";
$fileatt_name = "E1002.wav";
$type = "audio/x-wav";
$name = "E1002.wav";
$headers = "From: $from";
$semi_rand = md5( time() );
$mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x";
$headers = "From: $from\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: multipart/mixed;\r\n" .
" boundary=\"{$mime_boundary}\"";
$message = "This is an example" ;
$message = "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$message . "\n\n";
$file = fopen( $fileatt, 'rb');
$data = fread( $file, filesize( $fileatt ) );
fclose( $file );
$data = chunk_split(base64_encode($data));
$message .= "--{$mime_boundary}\n" .
"Content-Type: {$type};\n" .
" name=\"{$name}\"\n" .
"Content-Disposition: attachment;\n" .
" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n";
$message.="--{$mime_boundary}--\n";
$mail_sent = mail($to,$subject,$message,$headers);
echo $mail_sent ? "Mail sent" : "Mail failed";
|
|
|
|
|
Dear Friends,
I want to execute a redirect a URL in which i have to call a gateway server in order to send a sms. The Server on which i want to redirect a url is Linux based and the file code is on PHP. The particular php file is executed as a cron job.
As a cron job runs in backgroud, we are not able to redirect (Response.redirect("url") not allowed) and also it runs at middle layer (not presentation layer); how one will be able to do the above task then?
Thanks
|
|
|
|