# Help with absolute URL in php code

**URL:** <https://forum.kirupa.com/t/help-with-absolute-url-in-php-code/171786>\
**Category:** programming\
**Created:** [December 8, 2005, 4:40am UTC](https://forum.kirupa.com/t/help-with-absolute-url-in-php-code/171786 "2005-12-08T04:40:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HekG](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@HekG](https://forum.kirupa.com/u/HekG)\
**Post date:** [December 8, 2005, 4:40am UTC](https://forum.kirupa.com/t/help-with-absolute-url-in-php-code/171786/1 "2005-12-08T04:40:54Z")

</div>

Hello all,  
I’m using fckeditor in my newsletter application but when I upload an image and send the mailing, the images appear broken because their source url appears without the domain name in the front of the url. I need for the image urls to be absolute.

So now they appear as: [http://script\_directory/system/data/user\_uploads/1/Image/user/image.jpg](http://script_directory/system/data/user_uploads/1/Image/user/image.jpg)

They should be: [http://domain.com/script\_directory/system/data/user\_uploads/1/Image/user/image.jpg](http://domain.com/script_directory/system/data/user_uploads/1/Image/user/image.jpg)

Here’s my current php code … any suggestions?? Thank you 🙂

```auto
session_start();
$Config['UserFilesPath'] = $_SESSION['app']['Settings']['DataRelativePath'].'/user_uploads/'.$_SESSION['app']['Administrator']['AdministratorID'].'/';

```

Where in this piece of code should I enter my domain name??
