15,905,683 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by cheekycroak (Top 6 by date)
cheekycroak
18-Nov-23 4:32am
View
"As suggested by Richard Deeming two days ago" - I do not agree with that response Richard. Please see all of the above response that was provided to me. I am not going to argue and just want to close this query.
cheekycroak
18-Nov-23 4:01am
View
Deleted
I had another expert help me to resolve the issue. Below is the code for any future reference in case anyone is stuck like me. Appreciate everyone's help and time to reach a solution.
$url = trim($playlistSong->filename);
$url = str_replace("\\", "/", $url);
$url = str_replace("D:/", "https://mywebsite.com/", $url);
$url = str_replace("d:/", "https://mywebsite.com/", $url);
The HTML player now plays the song after the STR_replace:
https://m.tamilragam.com/albums_song.php?album=2006%20Hits
https://tamilragam.com/artist_song.php?artist=A.%20R.%20Rahman
cheekycroak
16-Nov-23 5:37am
View
Here is the code from my PHP page:
$url = $playlistSong->filename;
$url = str_replace(["\\","D:/"], ["/", "https://m.tamilragam.com/"], $url);
echo $url;
Screenshot of the code from the PHP page:https://m.tamilragam.com/php_code1.png
cheekycroak
16-Nov-23 5:17am
View
I am not doing any conversion as I would expect the str_replace to convert the path by pulling data from the database table name called 'filename'.
See the example from a database table: https://m.tamilragam.com/database_details.png
Please see the screenshot of the PHP code: https://m.tamilragam.com/php_code1.png
Final output on the test webpage: https://m.tamilragam.com/test1.albums_song.php?album=2000%20Hits
"Please edit your question and show the complete code that you are using, from where you capture the initial value, to where you add the final value to the web page." - I have provided screenshots and the codes used in my Solution 3 to Andre after responding to you.
cheekycroak
16-Nov-23 4:18am
View
Thank you, Richard, I changed it, and here's the result as per the screenshot:
https://m.tamilragam.com/richard.png
It still won't convert it to "https://m.tamilragam.com/Music/2000 Hits/Album.Mp3" so the HTML player can pick up the link.
cheekycroak
2-May-11 4:12am
View
Fantastic solution3!!! Thank you Kibab.It worked like a charm.
Many thanks to all those who responded.Below is the final code:
UPDATE songlist SET listen = replace(listen, "D:\\Downloads\\Music\\", "http://mysite.com/Music/")
Show More