Jump to content

replace cdn


php_begins

Recommended Posts

I retrieve urls that have the following path

$url=http://cdn.test1.com

$url=http://cdn.test2.com and so on...

i want to to do a string replace such that it displays http://test.com,http://test2.com and son without the cdn part.

Will the following work for all cases?

$url=str_replace("cdn.","",$url);

 

Link to comment
https://forums.phpfreaks.com/topic/251982-replace-cdn/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.